[Lazarus] Convert record to JSON?
Sven Barth
pascaldragon at googlemail.com
Tue Feb 26 11:11:09 CET 2019
Luca Olivetti via lazarus <lazarus at lists.lazarus-ide.org> schrieb am Di.,
26. Feb. 2019, 09:34:
> El 21/7/18 a les 18:26, Sven Barth via Lazarus ha escrit:
>
> >> !! :)
> > There are definitely still some problems with it, e.g. a field of type
> > TObject (or any descendant) currently can't be deserialized as I didn't
> > want to rewrite DeStreamClassProperty. Then there are the sets which for
> > non-published properties can be greater than 32-bit (up to 256-bit
> > currently). Support for dynamic arrays could be added as well.
> > Also I didn't check whether all types serialize/deserialize correctly,
> > e.g. especially the special floating point types Comp and Currency.
> > You'd need to check what Get-/SetFloatProp are doing there.
>
> I tested this unit and I see that it doesn't manage bitpacked records
> inside the record, and the field names are "Field1", "Field2", etc.
> (I wanted to test what happens if I add fields to a record then try to
> deserialize into it a previously serialized version, but without real
> field names I suppose that wouldn't work properly).
>
I didn't test bitbacked records so those might indeed fail.
And field names are currently not available. This would require the
extended RTTI which is still work-in-progress.
Regards,
Sven
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20190226/2d4b6c8f/attachment.html>
More information about the lazarus
mailing list