Re: [fpc-pascal] Framework for Objects Serialization / Deserialization

2016-04-01 Thread Dmitry Boyarintsev
On Fri, Apr 1, 2016 at 9:51 AM, Mazola Winstrol 
wrote:

> I can't change the actual hierarchical structure of my classes so i can't
> use TComponent.
>
> 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.
>

That might be handy.

In order to support Xcode project file (.pbx) structures I had to create a
stand-alone (de)serializers from scratch.
It's RTTI dependent, but is not based of TComponent.
It would also not fail, if encounters unrecognized property, instead would
keep it for the later serialization ( .pbx is undocumented and could change
without notice )

thanks,
Dmitry
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Framework for Objects Serialization / Deserialization

2016-04-01 Thread Mazola Winstrol
2016-04-01 3:46 GMT-03:00 Michael Van Canneyt :

>
>
> 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

Re: [fpc-pascal] Framework for Objects Serialization / Deserialization

2016-04-01 Thread Michael Van Canneyt



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.

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


[fpc-pascal] Framework for Objects Serialization / Deserialization

2016-03-31 Thread Mazola Winstrol
Hello list,

Is there a fpc framework for or some standard to serialize / deserialize
classes and other custom types?

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