HTTP & JSON
jsonStringify
$jsonStringify[]
$jsonStringify returns the JSON document of the current command as compact JSON text (no extra whitespace). Integral decimals are written without .0, like JSON.stringify: {"a":1.0} gives {"a":1}. It takes no argument. For indented output use $jsonPretty.
Syntax
bdfd
$jsonStringify[]
Behavior
- Returns an empty string if no JSON document exists yet (nothing loaded with
$json/$jsonParseand nothing set). - After
$jsonClear(or$jsonUnsetwith no argument) it returns an empty string again, not{}.
Examples
Convert JSON Context to String
$jsonParse[{"command":"ticket","active":true}]
$title[Serialized JSON]
$description[`$jsonStringify`]
$color[#00BCD4]
Try it
Paste an example into the playground to preview its message (functions that act on Discord are not run), or build the same thing with blocks.