Monkey Documentation

Class JsonArray


Extends:
Constructors:
  • New ( length:Int )
  • New ( data:JsonValue[] )
Properties:
Methods:
  • Get : JsonValue ( index:Int )
  • GetBool : Bool ( index:Int )
  • GetData : JsonValue[] ()
  • GetFloat : Float ( index:Int )
  • GetInt : Int ( index:Int )
  • GetString : String ( index:Int )
  • PushJson : Void ( buf:StringStack )
  • Set : Void ( index:Int, value:JsonValue )
  • SetBool : Void ( index:Int, value:Bool )
  • SetFloat : Void ( index:Int, value:Float )
  • SetInt : Void ( index:Int, value:Int )
  • SetString : Void ( index:Int, value:String )
Inherited Methods:

Constructor Documentation

Method New ( length:Int )

Creates a new array of the given length.

Method New ( data:JsonValue[] )

Creates a new array with the given data.


Property Documentation

Method Length : Int () Property

Returns length of the array.


Method Documentation

Method Get : JsonValue ( index:Int )

Throws a JsonError if index is out of bounds.

Returns a JsonNull object if element at index is null.

Method GetBool : Bool ( index:Int )

Throws a JsonError if index is out of bounds or value at index is not a JsonBool.

Method GetData : JsonValue[] ()

Gets internal array used to contain values.

Method GetFloat : Float ( index:Int )

Throws a JsonError if index is out of bounds or value at index is not a JsonNumber.

Method GetInt : Int ( index:Int )

Throws a JsonError if index is out of bounds or value at index is not a JsonNumber.

Method GetString : String ( index:Int )

Throws a JsonError if index is out of bounds or value at index is not a JsonString.

Method PushJson : Void ( buf:StringStack )

Method Set : Void ( index:Int, value:JsonValue )

Throws a JsonError if index is out of bounds.

Method SetBool : Void ( index:Int, value:Bool )

Throws a JsonError if index is out of bounds.

Method SetFloat : Void ( index:Int, value:Float )

Throws a JsonError if index is out of bounds.

Method SetInt : Void ( index:Int, value:Int )

Throws a JsonError if index is out of bounds.

Method SetString : Void ( index:Int, value:String )

Throws a JsonError if index is out of bounds.