jsonmcjason
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| jsonmcjason [2025/02/09 01:47] – created jwan | jsonmcjason [2025/10/10 10:15] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 21: | Line 21: | ||
| </ | </ | ||
| + | Add into json variable | ||
| + | < | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | // add an array | ||
| + | | ||
| + | for i := 1 to 3 do Js[' | ||
| + | </ | ||
| | | ||
| + | Check if a key exist | ||
| + | < | ||
| + | if js.HasKey(' | ||
| + | </ | ||
| + | To update value of key | ||
| + | < | ||
| + | if js.HasKey(key) then begin | ||
| + | js.Delete(key); | ||
| + | js.Add(key).AsString := value; | ||
| + | end; | ||
| + | </ | ||
| + | |||
| + | To get value of key | ||
| + | < | ||
| + | | ||
| + | </ | ||
| + | |||
| + | Parsing line break solution | ||
| + | < | ||
| + | | ||
| + | </ | ||
| + | |||
| + | Check if a string is a valid json | ||
| + | < | ||
| + | try | ||
| + | js.asjson := ' | ||
| + | | ||
| + | showmessage(' | ||
| + | end; | ||
| + | </ | ||
| + | |||
| + | Display the whole json string | ||
| + | < | ||
| + | | ||
| + | </ | ||
| + | |||
| + | More info at https:// | ||
jsonmcjason.1739065662.txt.gz · Last modified: (external edit)
