Add (Json function)

From m204wiki
Revision as of 20:31, 17 February 2015 by Alex (talk | contribs) (→‎Usage notes)
Jump to navigation Jump to search

Add an item to a JSON array (Json class)

[Introduced in Model 204 7.6]


This page is under construction.

Syntax

[%number =] json:Add( json) Throws InvalidJsonType

Syntax terms

%numberThe number of items in the array after the Add.
Json Json object, which must be an array or an InvalidJsonType exception is thrown.
json Json object that can be Null.

Usage notes

  • The added Json object becomes the last item in the array.
  • The value returned by Add is the same value that would be returned by an immediately following Count function.
  • Unlike the Arraylist and Stringlist Add methods, only one item can be added with the Json Add function.

Examples

See also