Store Array of Record in JSON
问题 How can an array of record be stored in JSON via SuperObject library. For example.. type TData = record str: string; int: Integer; bool: Boolean; flt: Double; end; var DataArray: Array[0..100] of TData; 回答1: Just use the superobject Marshalling TSuperRTTIContext program Project1; {$APPTYPE CONSOLE} {$R *.res} uses superobject, System.SysUtils; type TData = record str : string; int : Integer; bool : Boolean; flt : Double; end; TDataArray = Array [0 .. 100] of TData; procedure Test; var