You are not logged in.
Pages: 1
Hello,
I have a problem de-serializing a json string. After I get false from de-serialization function, I see some variables have value in my record.
In order to find my mistake, I would like to understand how mORMot doing de-serializing order.
For example I have below json string:
{"name":"test","surname":"test"}
And my record definition is:
type
TPerson = packed record
surname: string;
name: string;
end;
When de-serializing, is it name or surname that is filled in record variable first?
Thanks & regards,
Ertan
Offline
{"name":"testname","surname":"testsurname"}
Will set 'testname' into TPerson.name and 'testsurname' into TPerson.surname.
There is no such thing as "fill order"... it just put the right values in the right fields.
Note: if the record and the JSON have the same order, then it may be slightly faster to work with (no need to lookup the field name).
Offline
Pages: 1