User Tools

Site Tools


jsonmcjason

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
jsonmcjason [2025/02/09 01:57] – jwanjsonmcjason [2025/10/10 10:15] (current) – external edit 127.0.0.1
Line 49: Line 49:
    ShowMessage(js.Values[key].AsString);    ShowMessage(js.Values[key].AsString);
 </code> </code>
 +
 +Parsing line break solution
 +<code>
 +   js.add(key).asstring := stringreplace(value,slinkbreak,' ',[rfreplaceall]);
 +</code>
 +
 +Check if a string is a valid json
 +<code>
 +   try
 +      js.asjson := '{"i": 123, "f": 123.456, "s": "abc", "b": true, "n": null}';
 +   except
 +      showmessage('not valid json');
 +   end;
 +</code>
 +
 +Display the whole json string
 +<code>
 +   showmessage(js.asjson);
 +</code>
 +
 +More info at https://github.com/hydrobyte/McJSON
jsonmcjason.1739066271.txt.gz · Last modified: (external edit)

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki