No matching definitions.

json/emit

src/json/emit.tur
defn

json-emit

(json-emit [doc :int] :cstr)

serialize a JSON document to a compact string.

doc:int doc handle from json-parse (unwrapped ok-val)

:cstr -- compact JSON string (caller owns the memory)

(println (json-emit (ok-val (json-parse "{\"x\":1}"))))

Since: P4

defn

json-emit-pretty

(json-emit-pretty [doc :int] :cstr)

serialize a JSON document to an indented string.

doc:int doc handle from json-parse (unwrapped ok-val)

:cstr -- pretty-printed JSON string (caller owns the memory)

(println (json-emit-pretty (ok-val (json-parse "{\"x\":1}"))))

Since: P4