---
id: json-encode
name: Json.encode
category: json
kind: namespace-method
tokens: Json.encode
sig: Json.encode(value) -> string
tip: Serialize a value tree to compact JSON text.
order: 1
ns: Json
member: encode
---
Walks a value tree and returns compact JSON text. int nodes become integers, fixed nodes an exact decimal, bool true/false, str a quoted (escaped) string, and lists/objects the usual […]/{…} — object members keep insertion order, so the output is stable and diffable. The inverse is Json.parse; together with Reflect.serialize this is a one-call save.