Json methods syntax: Difference between revisions

From m204wiki
Jump to navigation Jump to search
(Automatically generated page update)
(Automatically generated page update)
Line 42: Line 42:
Throws [[JsonParseError class|JsonParseError]]</p>
Throws [[JsonParseError class|JsonParseError]]</p>
<p class="syntax" style="margin-bottom:0px; border-bottom:1px solid; border-left:1px solid; border-right:1px solid; border-top: none; margin-top:0px;"><span class="term">%Json</span><span class="literal"> =</span> <span class="squareb">[</span><span class="literal">%(Json):</span><span class="squareb">]</span><span class="literal">[[String (Json function)|String]]</span><span class="literal">(</span> <span class="term" title="Unicode">unicode</span><span class="literal">)</span></p>
<p class="syntax" style="margin-bottom:0px; border-bottom:1px solid; border-left:1px solid; border-right:1px solid; border-top: none; margin-top:0px;"><span class="term">%Json</span><span class="literal"> =</span> <span class="squareb">[</span><span class="literal">%(Json):</span><span class="squareb">]</span><span class="literal">[[String (Json function)|String]]</span><span class="literal">(</span> <span class="term" title="Unicode">unicode</span><span class="literal">)</span></p>
<p class="syntax" style="margin-bottom:0px; border-bottom:1px solid; border-left:1px solid; border-right:1px solid; border-top: none; margin-top:0px;"><span class="term">%unicode</span><span class="literal"> =</span> <span class="term">Json</span><span class="literal">:[[Stringify (Json function)|Stringify]]</span><span class="squareb">[</span><span class="literal">(</span> <span class="squareb">[</span><span class="literal" title="Number">Indent=</span> <span class="term" title="Number">number</span><span class="squareb">]</span><span class="literal">)</span><span class="squareb">]</span>
Throws [[JsonCircularReference class|JsonCircularReference]]</p>
<p class="syntax" style="margin-bottom:0px; border-bottom:1px solid; border-left:1px solid; border-right:1px solid; border-top: none; margin-top:0px;"><span class="term">%unicode</span><span class="literal"> =</span> <span class="term">Json</span><span class="literal">:[[StringValue (Json function)|StringValue]]</span>
<p class="syntax" style="margin-bottom:0px; border-bottom:1px solid; border-left:1px solid; border-right:1px solid; border-top: none; margin-top:0px;"><span class="term">%unicode</span><span class="literal"> =</span> <span class="term">Json</span><span class="literal">:[[StringValue (Json function)|StringValue]]</span>


Throws [[InvalidJsonType class|InvalidJsonType]]</p>
Throws [[InvalidJsonType class|InvalidJsonType]]</p>
<p class="syntax" style="margin-bottom:0px; border-bottom:1px solid; border-left:1px solid; border-right:1px solid; border-top: none; margin-top:0px;"><span class="term">%unicode</span><span class="literal"> =</span> <span class="term">Json</span><span class="literal">:[[Stringify (Json function)|Stringify]]</span><span class="squareb">[</span><span class="literal">(</span> <span class="squareb">[</span><span class="literal" title="Number">Indent=</span> <span class="term" title="Number">number</span><span class="squareb">]</span><span class="literal">)</span><span class="squareb">]</span>
Throws [[JsonCircularReference class|JsonCircularReference]]</p>
<p class="syntax" style="margin-bottom:0px; border-bottom:1px solid; border-left:1px solid; border-right:1px solid; border-top: none; margin-top:0px;"><span class="term">%unicode</span><span class="literal"> =</span> <span class="term">Json</span><span class="literal">:[[ToString (Json function)|ToString]]</span><span class="squareb">[</span><span class="literal">(</span> <span class="squareb">[</span><span class="literal" title="Number">Indent=</span> <span class="term" title="Number">number</span><span class="squareb">]</span><span class="literal">)</span><span class="squareb">]</span>
<p class="syntax" style="margin-bottom:0px; border-bottom:1px solid; border-left:1px solid; border-right:1px solid; border-top: none; margin-top:0px;"><span class="term">%unicode</span><span class="literal"> =</span> <span class="term">Json</span><span class="literal">:[[ToString (Json function)|ToString]]</span><span class="squareb">[</span><span class="literal">(</span> <span class="squareb">[</span><span class="literal" title="Number">Indent=</span> <span class="term" title="Number">number</span><span class="squareb">]</span><span class="literal">)</span><span class="squareb">]</span>



Revision as of 20:43, 11 May 2016

The syntax for each of the Json class methods is shown below.

Square brackets indicate optional elements of the method invocation. See also the notation conventions for methods and the List of Json methods.

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

%Json = [%(Json):]Array[( [itemList])]

%Json = [%(Json):]Boolean( boolean)

%boolean = Json:BooleanValue Throws InvalidJsonType

%outJson = Json:Copy

%count = Json:Count Throws InvalidJsonType

%outJson = Json:DeepCopy

[%number =] Json:Delete( index) Throws InvalidJsonType

%Json = [%(Json):]False

[%number =] Json:Insert( number, json) Throws InvalidJsonType

%currentJson = Json:Item( index) Json:Item( index) = newJson Throws InvalidJsonType

%outJson = Json:ItemByNumber( number) Throws InvalidJsonType

%unicode = Json:NameByNumber( number) Throws InvalidJsonType

%Json = [%(Json):]Number( number)

%number = Json:NumberByName( unicode)

%number = Json:NumberValue Throws InvalidJsonType

%Json = [%(Json):]Object

%Json = [%(Json):]Parse( unicode) Throws JsonParseError

%Json = [%(Json):]String( unicode)

%unicode = Json:Stringify[( [Indent= number])] Throws JsonCircularReference

%unicode = Json:StringValue Throws InvalidJsonType

%unicode = Json:ToString[( [Indent= number])] Throws JsonCircularReference

%Json = [%(Json):]True

%jsonType = Json:Type