Are there any Delphi serialization libraries that are capable of serializing records and arrays of records instead of classes?
Are there any Delphi serialization libraries that are capable of serializing records and arrays
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
@Max you can use the TJvAppXMLFileStorage component from JEDI to serialize an record or an array of records.
you can use the procedure called
WriteBinaryto store the data andReadBinaryto read.unfortunately there is not much documentation on this component, so here you have an very simple example for store a single record (for an array of records you can easily modify this source code).
The record structure
Save an record
this procedure create an XML file like this, the data is encoded in an hexadecimal format.
Read the persisted data
Check this full project (tested in Delphi 7)