formatJson := format_json(Args{json_string: "..."})
send_text_message(Args{
channel_id: trigger.channel_id,
message_content: "Formatted JSON: " + formatJson.formatted_json,
})
Inputs
JSON StringRequired
JSON string to format.
Outputs
Formatted JSON
Pretty-printed JSON string.
Example: { "key": "value" }
Build a bot using blocks like Format JSON
Use this block in our visual flow editor. Bots are hosted 24/7 for free on inventor.bot.
Advanced Documentation
This documentation can be useful when using code mode. View as Markdown
ID:
format_jsonInputs
| Field | InventScript name | Value |
|---|---|---|
| JSON String | json_string |
Outputs
| Field | InventScript name | Value |
|---|---|---|
| Formatted JSON | formatted_json | e.g. "{\n \"key\": \"value\"\n}" |
Example InventScript
More network blocks
Escape JSON FieldEscape a string to be used as a JSON field.Parse JSONRetrieve a value from a JSON string.Generate Form BodyGenerate a HTTP form body from a list of key-value pairs.Network RequestSend an HTTP request and return the response.Respond to Incoming WebhookRespond to an incoming webhook request with a custom status code and response body.