BiJson
This class is used to serialize and deserialize javascript objects from and to a JSON string. JSON stands for JavaScript Notation Format and you can find more information at http://json.org.
When serializing objects we check if the object has a serialize method and if so we use that instead.
This class extends BiObject and therefore all methods and fields available for BiObject are also available for BiJson .
Constructor
new BiJson ( )
Parameters
No parameters.
Properties
None.
Methods
None.
Events
None.
Static Methods
| Name | Description |
deserialize | Takes a string encoded using JSON and returns a javascript object |
serialize | Takes a javascript object end serializes it to a JSON string |
Static Fields
None.
Remarks
To load a JSON file you can use the BiJsonLoader. This class cannot be instatiated. Instead call the static methods directly
Static Method Details
deserialize
Takes a string encoded using JSON and returns a javascript object
Syntax
BiJson . deserialize ( s ) Parameters
| Name | Type | Optional | Default | Descripton |
s | String | The JSON string to decode |
Return Type
Object
serialize
Takes a javascript object end serializes it to a JSON string
Syntax
BiJson . serialize ( obj ) Parameters
| Name | Type | Optional | Default | Descripton |
obj | Object | The object to encode |
Return Type
String