2016-04-01 3:46 GMT-03:00 Michael Van Canneyt <mich...@freepascal.org>:

>
>
> On Fri, 1 Apr 2016, Mazola Winstrol wrote:
>
> Hello list,
>>
>> Is there a fpc framework for or some standard to serialize / deserialize
>> classes and other custom types?
>>
>
> At least two units offer the base for such functionality:
> jsonrtti (fcl-json) and restbase (fcl-web)
>
> And obviously any TComponent can be streamed in the Delphi-native format.
>
>
Thanks for your reply Michael.

I can't change the actual hierarchical structure of my classes so i can't
use TComponent.

I can serialize custom types (e.g records) using fcl-json?

Delphi do have an intersting way to do with serialization: they have some
standard classes (TTypeMashaller, TConverter). If one wants to serialize to
a new format (e.g binary format), one can extended those base classes and
implement such serialization. Would be interesting if we create an
infrastructure like that.

http://docwiki.embarcadero.com/RADStudio/Seattle/en/Serializing_User_Objects
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to