Einzelnen Beitrag anzeigen

mjustin

Registriert seit: 14. Apr 2008
3.005 Beiträge
 
Delphi 2009 Professional
 
#3

AW: Maskierten JSON-String demaskieren

  Alt 24. Jun 2019, 12:05
Mit https://github.com/ahausladen/JsonDataObjects sollte das kein Problem sein:

1. String parsen

Delphi-Quellcode:
var
  Obj: TJsonObject;
  Result: string;
begin
  Obj := TJsonObject.Parse('{\n \"value\": null,\n \"valueType\": \"String\"\n}') as TJsonObject;
2. JSON im kompakten Format einem String zuweisen:

Delphi-Quellcode:
  ShowMessage(Obj.ToJSON({Compact:=}True));

finally
    Obj.Free;
end;
Michael Justin
habarisoft.com
  Mit Zitat antworten Zitat