Standard Library - json

json := import("json")

Functions

Examples

json := import("json")

encoded := json.encode({a: 1, b: [2, 3, 4]})  // JSON-encoded bytes string
indentded := json.indent(encoded)             // indented form
html_safe := json.html_escape(encoded)        // HTML escaped form

decoded := json.decode(encoded)               // {a: 1, b: [2, 3, 4]}