Please enable JavaScript to view this site.

Codolex

Navigation: Activities > JSON

Text to JSON

Scroll Prev Top Next More

The text to JSON Activity parses a string into a TJSONValue object.

uses System.JSON.TJSONObject.ParseJSONValue

 

TextToJSON

Activity properties

 

begin

 var JSON: TJSONValue;

 JSON := TJsonObject.ParseJsonValue('{"menu": {' +

'  "id": "file",' +

'  "value": "File",' +

'  "popup": {' +

'    "menuitem": [' +

'      {"value": "New", "onclick": "CreateNewDoc()"},' +

'      {"value": "Open", "onclick": "OpenDoc()"},' +

'      {"value": "Close", "onclick": "CloseDoc()"}' +

'    ]' +

'  }' +

'}}');

end;

Resulting code

 

 

© by GDK Software