json_decode
host callCapy
function json_decode(value : string) dval
Description
json_decode() converts JSON text to a dval value. Objects become maps, arrays become lists, and null becomes none.
Parameters
value : JSON text
Return Values
The decoded dval value.
Example
Capy
var value := json_decode("{\"name\":\"Ada\",\"tags\":[\"x\",\"y\"]}")
print(value["name"], " has ", length(value["tags"]), " tags\n")