HTTP & JSON
jsonParse
$jsonParse[]
$jsonParse loads a JSON text — an API response, user input — into the JSON document of the current command and replaces whatever was stored. It returns an empty string.
Syntax
bdfd
$jsonParse[json]
Parameters
| Parameter | Description |
|---|---|
json |
Required. The JSON text. Exactly one argument is accepted. |
Behavior
- A JSON object or array becomes the document.
- Anything else — malformed JSON, an empty string, a number or a string literal — does not raise an error: the document becomes an empty object
{}. - Use
$jsonStringifyto get the document back as text.
Examples
Parse JSON into Embed
$jsonParse[{"title":"Welcome","description":"Enjoy your stay!","color":"#5865F2"}]
$title[$jsonValue[title]]
$description[$jsonValue[description]]
$color[$jsonValue[color]]
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.