Xdata Deserialize question

Hi everyone,
I need to understand what to use in the case of deserializing a json coming from a call to an XData service (classic Json in body on Post);
the json received must be deserialized into an Aurelius class to be managed and above all validated for writing to the database.
My question:
Aurelius uses 2 methods for serialization/deserialization (as per the manual): A DataSnap serialization, and a SuperObject.
The first is old like my grandfather and very very slow, the second is now deprecated and abandoned.
Since I need performances, is there any other working component that allows you to serialize/deserialize Aurelius classes for use in Xdata code?
Is BCL's Json handling able to deserialize perfectly into an Aurelius class, for example?
Thanks in advance.

Can I use TXDataClientDeserializer with safety in Xdata server for create Aurelius entities?

Yes.

And why do you need to manually deserialize JSON coming from XData calls, if TXDataClient does that for you?

Let me clarify the situation:
another web application, not built in Delphi, needs to use my Xdata services (service call, Json-Rpc compliant, not via rest). And it send json contents in the body of the post which must be imported into Aurelius entities in Xdata to be managed and validated for writing to the Db via Xdata-Aurelius methods.
Therefore I have no XdataClient, no Delphi client, so the deserialization process must be carried out in the Xdata service, converting the received json data into Aurelius entities. Therefore I simply have to deserialize the received requests (plain json, no $Type, etc..) into Aurelius entities in Xdata. As fast as possible in case of high traffic volume :-)
Thank you

1 Like

So, I must use TxDataClientDeserialize, even if we are deserializing internally to the Xdata server, or there is a better way?

Thanks in advance!

TXDataClientDeserializer is an option, yes. It all actually depends on the JSON your client is sending.

Ok, thank you.
If there were to be some even more immediate and direct way to serialize/deserialize plain json into Aurelius entities, I'm ready to use it.
In the meantime, thanks for your help.

1 Like