You are not logged in.
Pages: 1
Hi,
I have an old project that I need to make some changes and additons. I am using mORMot 1 in that project for json handling and now I want to switch using mORMot2.
But, I could not find any example project or some information (even on this forum) to adapt my code. It is more than possible I overlooked at it.
There is ThirdPartyDemos\martin-doyle\03-MethodBasedServices example project which has very basic json handling and that is all I could find.
I do not know if having just "mormot.core.json" is enough in uses list.
TTextWriter.RegisterCustomJSONSerializerFromText() is something that I use in old project and I could not see how to use/convert it to mORMot2.
I am also not quite sure how to serialize/de-serialize arrays and regular json.
Any help is appreciated.
Thanks & Regards,
Ertan
Offline
In mORMot2 I uses Rtti.RegisterFromText from mormot.core.rtti.pas - here is a live example for array of record
Offline
This was what I have been looking for.
Both name and unit change and I failed to find it in mORMot2 sources.
Thank you.
Offline
You are right, it was confusing.
Hope https://github.com/synopse/mORMot2/commit/091b2a36 will help in the future.
Sorry for the confusion.
Offline
A good reference for future.
Thank you.
Offline
Pages: 1