Version: v0.8.1 - Beta.  We welcome contributors & feedback.

Json.decode

Json.decode($jsonTypeString) -> map|list

Description

Convert a JsonTypeString into a data structure of Maps & Lists.

It will throw an exception if the JSON can not be parsed.

// Ex: From a file
$jsonString = json'{"name":"Thoreau","born":1817}'

$author = Json.decode($jsonString)

$author.born  //= 1817