You are not logged in.
Pages: 1
I need to convert to JSON this static arrays and don't known how.
type
TCCConfig = packed record
Version: string[10];
DNDReasons: array[1..15] of string[15];
end;
const
__TCCConfig = 'Version string[10] DNDReason array[1..15] of string[15]';
....
// then use move to fill this record with lData stream.
var
CCConfig: TCCConfig;
CurOff: Integer;
begin
TTextWriter.RegisterCustomJSONSerializerFromText(TypeInfo(TCCConfig), <------------- ERROR
__TMCCConfig).Options := [soReadIgnoreUnknownFields,soWriteHumanReadable];
CurOff := 1;
system.move(lData[CurOff], CCConfig, sizeof(CCConfig));
Offline
Thanks Ab but can't understand. Have you an example?
Offline
Just have a look at: http://synopse.info/files/html/Synopse% … #TITLE_231 for a starting point...
Offline
Pages: 1