baml.json.stringify

Serializes a `json` value to compact JSON text.

Reference version

Signature

function baml.json.stringify(j: baml.json.json) -> string throws never

Serializes a json value to compact JSON text.

Never fails: every json arm has a JSON form. The one lossy case is a non-finite float — JSON has no NaN or infinity, so those become null. For a value that is not already a json, use to_string.

Source:<builtin>/baml/ns_json/json.bamlbytes 2572–2645