json-toon-converter
Reactive icon

Json Toon Converter

Stable version 1.0.0 (Compatible with OutSystems 11)
Uploaded
 on 15 Nov (yesterday)
 by 
0.0
 (0 ratings)
json-toon-converter

Json Toon Converter

Documentation
1.0.0

ConvertJsonToToon

Overview

ConvertJsonToToon is a lightweight OutSystems Client Action that transforms any JSON string into a simplified, structured text format called Toon. This makes JSON data easier to read, share, and display in user interfaces without the complexity of curly braces and nested syntax.


Key Features

  • Converts JSON into a human-readable outline.
  • Handles nested objects and arrays with indentation.
  • Supports multiple output styles:
    • Multi-line (\n) for Text widgets.
    • HTML-friendly (<br> and &nbsp;) for Rich Text widgets.
    • Single-line for compact display.
  • Works entirely on the client side for fast performance.

Inputs

  • JsonText (Text)
    Raw JSON string to be converted.

  • JoinSeparator (Text, optional)
    Defines how lines are joined:

    • "\n" → Multi-line text.
    • "<br>" → HTML output.
    • " " → Single-line compact format.

Output

  • Toon (Text)
    The formatted text representation of the JSON.

Use Cases

  • Display API responses in a readable format.
  • Show structured data in dashboards or popups.
  • Prepare compact summaries for logs or reports.

Benefits

  • Improves readability of complex JSON.
  • Reduces visual clutter for end-users.
  • Flexible for different UI contexts.

How It Works

  • Parses the JSON string.
  • Recursively processes objects and arrays:
    • Objects → key: followed by indented properties.
    • Arrays → items[n]: followed by - value for each item.
  • Joins all lines using the specified separator.