Capy-Bearer Documentation

json_encode

host call

Capy

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

Description

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

Parameters

value : a string or dval value

Return Values

JSON text.

Example

Capy

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