Closed RDP1974 closed 5 months ago
Can you provide a reproducible example? Also, the dataset structure but be defined before load JSON. If you want to create structure too you need to use metadata JSON.
Il gio 11 gen 2024, 21:52 Roberto Della Pasqua @.***> ha scritto:
I'm trying to convert a json string to a fdmemtable
function JsonToMemTable(const S: string): TFDMemTable; var lSer: TMVCJsonDataObjectsSerializer; lJsn: TJDOJsonObject; begin Result := TFDMemTable.Create(nil); lJsn := StrToJSONObject(S); lSer := TMVCJsonDataObjectsSerializer.Create; try lSer.JsonObjectToDataSet(lJsn, Result, [], TMVCNameCase.ncLowerCase); finally lSer.Free; lJsn.Free; // testare end; end;
I get error there: (invalid character in string at 1,339) function StrToJSONObject(const aString: String; ARaiseExceptionOnError: Boolean = False): TJsonObject; begin Result := MVCFramework.Utils.StrToJSONObject(aString, ARaiseExceptionOnError); end;
however the string is correct JSON and works fine with other serializer tested how to solve?
— Reply to this email directly, view it on GitHub https://github.com/danieleteti/delphimvcframework/issues/726, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAK4ZJHKMJPSBKNF2XUA3WDYOBGJZAVCNFSM6AAAAABBXDUFAWVHI2DSMVQWIX3LMV43ASLTON2WKOZSGA3TONJWGUYTKOI . You are receiving this because you are subscribed to this thread.Message ID: @.***>
I'm trying to convert a json string to a fdmemtable
I get error there: (invalid character in string at 1,339)
however the string is correct JSON and works fine with other serializer tested how to solve?