Legal Notice, Privacy Policy

Impressum, Datenschutzerklärung

Cerberus X Documentation

Class JsonValue

This base class provides some fall-back functionality for the specific json value More...

Declarations

Extended By
JsonArray , JsonBool , JsonNull , JsonNumber , JsonObject , JsonString
Please note that only documented classes are listed here, there might be undocumented classes that extend this one.
Properties
Type : Int () Indicates the type of the specific JsonValue object.
Methods
BoolValue : Bool () For a JsonBool, this will return its boolean value.
FloatValue : Float () For a JsonNumber, this will return its numerical value as float.
IntValue : Int () For a JsonNumber, this will return its numerical value as int.
StringValue : String () For a JsonString, this will return its string value.
ToJson : String () Converts value to a JSON string.

Detailed Discussion

This base class provides some fall-back functionality for the specific json value classes.


Properties Documentation

Method Type : Int () Property

Indicates the type of the specific JsonValue object. Type is one of the following:

TypeMeaning
JsonValue.OBJECTTYPEobject is JsonObject
JsonValue.ARRAYTYPEobject is JsonArray
JsonValue.NULLTYPEobject is JsonNull
JsonValue.BOOLTYPEobject is JsonBool
JsonValue.NUMBERTYPEobject is JsonNumber
JsonValue.STRINGTYPEobject is JsonString

Methods Documentation

Method BoolValue : Bool ()

For a JsonBool, this will return its boolean value.

Otherwise, it throws a JsonError.

Method FloatValue : Float ()

For a JsonNumber, this will return its numerical value as float.

Otherwise, it throws a JsonError.

Method IntValue : Int ()

For a JsonNumber, this will return its numerical value as int.

Otherwise, it throws a JsonError.

Method ToJson : String ()

Converts value to a JSON string.