parseJSON
See also: toJSON
With this function a JSON string can be parsed as an object.
Syntax
$parseJSON(jsonString[,classField=class])
Parameter
Name |
Description |
jsonString |
The object as JSON string. For fixed values, the parser-specific characters must be escaped: \ => \\ { => \{ } => \} [ => \[ ] => \] ( => \( ) => \) $ => \$ , => \, |
classField |
Optional, default value = 'class', specifies the property in which the class name is to be searched. This may need to be set to 'clazz'. |
Return value
The object parsed from JSON.
Example
Listing of at least one or more examples.
Syntax |
Result |
$parseJSON(\{"name": "Hans"\}) |
{ "name" : "Hans" } |