:sig
function json_encode(value : dval) string
function json_encode(value : string) string

:params
value : a string or `dval` value

:returns
JSON text.

:content
`json_encode()` converts a string or `dval` value to JSON text. A `none` value becomes JSON `null`.

:example capy render
print(json_encode(dval({"name": "Ada", "middle": none})), "\n")

:see-group
encoding
