parse_zson

Table of Contents

Function

parse_zson — parse ZSON or JSON text into a Zed value

Synopsis

parse_zson(s: string) -> any

Description

XXX change this to parse_sup()

The parse_zson function parses the s argument that must be in the form of Super JSON or JSON into a value of any type. This is analogous to JavaScript’s JSON.parse() function.

Examples

Parse Super JSON text

foo := parse_zson(foo)
{foo:"{a:\"1\",b:2}"}
Loading...

Parse JSON text

foo := parse_zson(foo)
{"foo":
"{\"a\":
\"1\",
\"b\":
2}"}
Loading...
Next: pow

SuperDB