on-internet
← Community

Serialize and deserialize a collection to JSON Delphi

Stack Overflow ·

I've searched a lot, but cannot find a working solution. Most likely because I'm pretty new to Delphi (and coming from C#). I have a unit with the following class declaration: TReplaceField = class public Key: string; Value: string; constructor Create; overload; constructor Create(strKey, strValue: string); overload; end; Class can also be record, like suggested in the comment. I want to create a collection of it, be it an array, TList<T>, or whatever suits best in this case, and then serialize it to JSON (to store it) and later deserialze it to loop over the fields. I've found REST.JSON and T

Comments

Sign in or sign up to comment and upvote.

No comments yet.