jsonEncode ( object object ) : string
Return an string corresponding on a JSON encoding of the object.
Note: This function accepts null values to create a JSON, but note normally null are not accepted by JSON. If you use it, it is possible the JSON will be rejected by another system.
Example
console(jsonEncode(["mark":"Fiat","model":"500"])) //-> "{\"mark\":\"Fiat\",\"model\":\"500\"}"
Parameters