#1 2015-01-27 17:25:05

foncci
Member
Registered: 2013-11-15
Posts: 53

Serialize several datasets

Hi, I need to serialize several datasets, for example Invoices, Details, Customers and Groups and expose them (maybe a DatasetToJSON function?), how can I join them in one JSON object? Any sample?
Of course, later I need to unserialize it (JSONToDataSet?) to 4 memory datasets. I'm using FirecDAC in memory DataSet but I'm open to other ideas.

Can I use mORMot on Android 4 as client to consume those datasets?

Regards,

Al

Offline

#2 2015-01-28 09:36:17

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,659
Website

Re: Serialize several datasets

The easiest is to use a TDocVariant from SynCommons.pas - or TJSONVariant for our SynCrossPlatformJSON.pas unit which works with Android 4 - to create a document containing several datasets.

But we do not have TDataSet to/from JSON classes for cross-platform yet.

Offline

#3 2015-01-28 20:04:28

foncci
Member
Registered: 2013-11-15
Posts: 53

Re: Serialize several datasets

ab, and what about using FireDac.Reflection classes? of course those are new to XE6 but it is a beginning. The only thing DataSnap is supperior to mORMot is this.

Offline

Board footer

Powered by FluxBB