Page History
...
The Name parameter can be anything you want as it is only used for debugging purposes. The name will appear when calling SRP_JsonX_State or SRP_JsonX_Trace.
Every call to SRP_JsonX_Begin must eventually be paired with a call to SRP_JsonX_End.
Examples
Code Block |
---|
$insert SRPJSONX SRP_JsonX_Begin('MyDocument', '{') SRP_JsonX('employees', '[') SRP_JsonX('{') SRP_JsonX('firstname', 'John') SRP_JsonX('lastname', 'Doe') SRP_JsonX('age', 21) SRP_JsonX('}') SRP_JsonX('{') SRP_JsonX('firstname', 'Anna') SRP_JsonX('lastname', 'Smith') SRP_JsonX('age', 32) SRP_JsonX('}') SRP_JsonX('{"firstname":"Peter", "lastname":"Jones", "age":43}') SRP_JsonX(']') SRP_JsonX('count', 4) SRP_JsonX('active', 1, 'Bool') SRP_JsonX('alwaysnull') SRP_JsonX('alwaysstring', 4.321, 'String') Json = SRP_JsonX_End('Pretty') |
...