On Tue, 17 May 2016, Graeme Geldenhuys wrote:

Hi,

Is it possible (or on some wish list) to register new data types with
fpjson so it can understand and generate custom output, and understand
reading back that custom output.

There cannot be custom output in JSON, then it would no longer be JSON. JSON is a fixed defined format; it does not allow "deviation".

What you probably need is what RTTIJSON does, or the restbase class.
Alternatively WST also has a serializer that outputs JSON.

But they all have 1 thing in common: they take an object instance,
and serialize this to JSON or vice versa. Custom types must be coerced into
one of the types that JSON understands.

Michael.
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to