-
Notifications
You must be signed in to change notification settings - Fork 159
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't generate unit from valid json #59
Comments
What do you mean by "can't generate unit" ? JsonDataObjects can read that JSON string. |
It crashes on line 556 in Pkg.Json.Mapper (Delphi 10.3.3): |
So you are not using my JsonDataObjects unit but reporting a bug in Delphi's own JSON library? |
Could it be that you do a hard type cast "TJsonObject(obj)" somewhere but you cast to the wrong TJsonObject class. |
Sorry, my mistake, wrong github repo . |
Sample json:
{
"promotions":[
{
"id":1,
"title":"Special offer",
"start_at":"2014-11-01 00:00:00",
"finish_at":"2014-11-05 00:00:00",
"promotion_type":1,
"promotion_value":5000,
"promotion_on_type":1,
"products":[
1,
2
],
"promotion_on_value":[
1,
2
],
"activate":2,
"created_at":"2011-09-22 01:15:35"
},
{
"id":2,
"title":"Winter sale",
"start_at":"2014-12-01 00:00:00",
"finish_at":"2014-12-30 00:00:00",
"promotion_type":2,
"promotion_value":25,
"promotion_on_type":1,
"products":[
1,
2
],
"promotion_on_value":[
1,
2
],
"activate":2,
"created_at":"2011-09-22 01:15:35"
}
]
}
The text was updated successfully, but these errors were encountered: