dynamic-json-parser
Reactive icon

Dynamic JSON Parser

Stable version 2.0.0 (Compatible with OutSystems 11)
Uploaded
 on 2 Feb (4 hours ago)
 by 
0.0
 (0 ratings)
dynamic-json-parser

Dynamic JSON Parser

Details
Dynamic JSON Parser is a Forge Component for OutSystems that flattens complex JSON structures into a tabular-like format, making it easy to read, analyze, and process nested JSON objects and arrays. It supports all common data types, including text, integers, decimals, booleans, dates, datetimes, times, arrays, objects, and handles empty or null values gracefully. The component outputs each JSON attribute with detailed metadata, including its hierarchical path (pathValue), parent key, depth level (level), parent and child array indices, and type. It automatically detects invalid JSON and handles deeply nested arrays and objects, enabling developers to visualize and work with structured JSON data efficiently in OutSystems. This asset is ideal for scenarios where JSON responses from APIs or external systems need to be processed, displayed in tables, or integrated with OutSystems data models.
Read more

Documentation: Dynamic JSON Parser

1. Overview

The Dynamic JSON Parser Forge component provides a utility for flattening complex JSON structures into a tabular-like format for easy processing in OutSystems Reactive applications. This component is especially useful for:

  • Parsing deeply nested JSON objects and arrays.
  • Capturing the full hierarchy of JSON keys, values, and metadata.
  • Preparing JSON data for display, reporting, or integration with structured OutSystems entities.

The component supports a wide range of JSON types, including arrays, objects, primitive values, and handles empty or null fields.

2. Input Parameters

Parameter NameTypeRequiredDescription
JsonTextTextYesThe JSON string to be flattened. Can include nested objects, arrays, primitives, or combinations.


3. Output Parameters

Parameter NameTypeDescription
FlattenedJsonTextTextA JSON string representing the flattened output with all metadata fields.
IsValidJsonBooleanIndicates if the input JSON is valid (true) or invalid (false).


4. Output JSON Structure

Each record in the flattened output contains the following fields:

FieldTypeDescription
keyTextThe key name of the JSON attribute.
valueText / Number / Boolean / [nested] / [nested-blank] / [blank]The actual value of the attribute. [nested] for non-empty objects/arrays, [nested-blank] for empty objects/arrays, [blank] for null or empty strings.
pathValueTextThe hierarchical path to the attribute, including array indices, e.g., records[0].items[1].value.
typeTextThe data type: text, integer, decimal, boolean, date, datetime, time, array, object, or empty for blank values.
parentTextThe key of the immediate parent object. Blank if root.
levelIntegerDepth level in the JSON hierarchy (0 = root, 1 = first-level child, etc.).
parentIndexIntegerIndex of the parent in its array if parent is an array; 0 otherwise.
childIndexIntegerIndex of this element if it belongs to an array; 0 otherwise.


5. Supported JSON Data Types

The component handles:

  • Primitive types:
    • String ? text
    • Integer ? integer
    • Decimal ? decimal
    • Boolean ? boolean
    • Null / empty string ? [blank]
  • Date/Time types (string format):
    • ISO Date (YYYY-MM-DD) ? date
    • ISO DateTime (YYYY-MM-DDTHH:MM:SSZ) ? datetime
    • Time (HH:MM:SS) ? time
  • Compound types:
    • Object ? object
    • Array ? array
    • Empty array or object ? [nested-blank]

6. JSON Flattening Rules

  • Primitive Values: Directly stored with key, value, type. pathValue tracks the full hierarchical path.
  • Objects: Non-empty ? value = [nested], type = object; Empty ? value = [nested-blank], type blank.
  • Arrays: Non-empty ? value = [nested], type = array; Empty ? value = [nested-blank], type blank. Array elements include indices in pathValue (e.g., arrayName[0]).
  • Hierarchy Metadata: level increments for each nesting; parent references immediate parent key; parentIndex tracks array index of parent if applicable; childIndex tracks array index of current element if applicable.
  • Blank Values: Null or empty strings ? value = [blank], type = "".

7. Edge Cases Handled

  • Deeply nested objects and arrays.
  • Empty arrays and objects ([nested-blank]).
  • Null or empty values ([blank]).
  • Array indices are included in pathValue.
  • All supported primitive types, including date, datetime, time.

8. Recommended Usage

  • Input: Provide a valid JSON string in the JsonText input parameter.
  • Call: Use this component in Reactive screens or server actions.
  • Output: Parse FlattenedJsonText into an OutSystems Record List for table display or further processing.

9. Notes

  • Invalid JSON strings are automatically detected. FlattenedJsonText will contain: [{"error":"Invalid JSON"}]
  • Arrays and objects are recursively traversed to any depth.
  • The component is optimized for clarity in hierarchy using pathValue, level, parentIndex, and childIndex.
Release notes (2.0.0)

🔔 Version 2.0.0 – Release Summary

Added Server-Side Dynamic JSON Parsing support, allowing JSON flattening to be executed in Server Actions and backend processes.

Attributes with Text/JSON values are now safely detected and preserved as text and are excluded from the parsing process, preventing unintended inner parsing.

This release maintains full backward compatibility with existing client-side implementations and ensures consistent metadata output across both client and server execution.

License (2.0.0)
Reviews (0)
Team
Other assets in this category