Matt S Trout > Rakudo-Star-2012.08_001 > a

Download:
Rakudo-Star-2012.08_001.tar.gz

Annotate this POD

Source  

NAME ^

JSON, a lightweight data-interchange format.

DESCRIPTION ^

The from_json method return a PMC that contains the data structure for a given valid JSON (JavaScript Object Notation) string. For example:

    .sub 'main' :main
         .local pmc result

        load_language 'JSON'
        result = from_json( '[1,2,3]' )

        load_bytecode 'dumper.pbc'
        _dumper( result, 'JSON' )
    .end

To generate a JSON representation of a PMC, see "parrot/library/JSON.pir" in runtime.

For more information about the structure of the JSON representation, see the documentation at http://www.json.org/.

syntax highlighting: