Class brl.json.JsonObject - leonard-thieu/monkey GitHub Wiki
JsonValue
Contains : Bool ( key:String )
Get : JsonValue ( key:String, defval:JsonValue )
GetBool : Int ( key:String, defval:Bool )
GetData : StringMap ()
GetFloat : Float ( key:String, defval:Float )
GetInt : Int ( key:String, defval:Int )
GetString : String ( key:String, defval:String )
PushJson : Void ( buf:StringStack )
Set : Void ( key:String, value:JsonValue )
SetBool : Void ( key:String, value:Bool )
SetFloat : Void ( key:String, value:Float )
SetInt : Void ( key:String, value:Int )
SetString : Void ( key:String, value:String )
Creates a new empty json object.
Method New ( json:String )
Creates a new json object from the given JSON string.
Throws a JsonError if json is invalid.
Method New ( data:StringMap )
Creates a new json object with the given data.
Returns true if the json object contains key.
Returns defval if key doesn't exist.
Returns a JsonNull object if key is mapped to null.
Returns defval if key doesn't exist.
Throws a JsonError if value mapped to key is not a JsonBool.
Method GetData : StringMap ()
Gets the internal map used to represent the object.
Returns defval if key doesn't exist.
Throws a JsonError if value mapped to key is not a JsonNumber.
Returns defval if key doesn't exist.
Throws a JsonError if value mapped to key is not a JsonNumber.
Returns defval if key doesn't exist.
Throws a JsonError if value mapped to key is not a JsonString.