JSON or binary stream? Delphi 2010: How to save a whole record to a file? – Stack Overflow
Posted by jpluimers on 2021/03/03
A while back I proposed using JSON in order to [WayBack] Delphi 2010: How to save a whole record to a file? – Stack Overflow.
There is also a native solution using streaming (which by now has moved to [WayBack] GitHub – KrystianBigaj/kblib: Automatically exported from code.google.com/p/kblib with main source file [WayBack] kblib/uKBDynamic.pas), but be aware that unlike JSON:
- Streams are not fully compatible between Delphi Unicode and Delphi non-Unicode (they are if you limit yourself to
AnsiString
)- Streams are not compatible between x64 and x86 unless you use
kdoCPUArchCompatibility
and provide additional compatibility (read comments onkdoCPUArchCompatibility
)
The main file from my proposed solution has since then move
- from radstudiodemos.svn.sourceforge.net/svnroot/radstudiodemos/branches/RadStudio_XE/DataSnapXE/DelphiDSServer/Classes/BaseObject.pas
- to [Archive.is] svn.code.sf.net/p/radstudiodemos/code/branches/RadStudio_XE/DataSnapXE/DelphiDSServer/Classes/BaseObject.pas
Which reminds me I still need to fix quite a few links, as per Anyone who knows about http://sourceforge.net/p/radstudiodemos/code/HEAD/tree/branches/RADStudio_Rio ?
–jeroen
Leave a comment