Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Use CaseSyntaxBehavior
Adding Member to Object
SRP_JsonX(MemberName, Value, Hint)
Adds or replaces the member of the current object with the given value. If you omit the value, then you set the member to null. 
Adding Value to Array
SRP_JsonX(Value, Hint)
Adds the given value to the end of the current array. If you omit the value, then you add null to the end of the array.
Starting Object/Array in Object
SRP_JsonX(MemberName, Opener)
Adds or replaces the member of the current object with an empty object or array. The opener must be "{" to start a new object or "[" to start a new array. The new object/array becomes the current element.
Starting Object/Array in Array
SRP_JsonX(Opener)
Adds an empty object or array to the end of the current array. The opener must be "{" to start a new object or "[" to start a new array. The new object/array becomes the current element.
Closing
SRP_JsonX(Closer)
Passing "}" or "]" closes the current object or array and makes it's parent the new current element.

The Value parameter will be smartly interpreted by the routine unless a Hint is specified. OI numbers are converted into json numbers. You can also pass json as a value, and this routine will parse the json and set it as the current element's value.

The Hint parameter can be used to force the value into a specific json type. Use "Bool" to force the value to be true or false. Use "Null" to ignore the given value and just use null as the value. Use "String" to force the value into a string, which is useful when you want an OI number to be surrounded by quotes in the json itself.

...