Add (Json function): Difference between revisions

From m204wiki
Jump to navigation Jump to search
Line 14: Line 14:


==Usage notes==
==Usage notes==
<ul>
<li>The added Json object becomes the last item in the array.</li>
<li>The value returned by Add is the same value that would be returned by an immediately following [[Count (Json property)|Count function]].</li>
<li>Unlike the [[Add (Arraylist function)|Arraylist]] and [[Add (Stringlist function)|Stringlist]] Add methods, only one item can be added with the Json Add function.</li>
</ul>
==Examples==
==Examples==
==See also==
==See also==
{{Template:Json:Add footer}}
{{Template:Json:Add footer}}

Revision as of 20:31, 17 February 2015

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