Skip to content

Parser

Parses a string in JSON, YAML, TOML, or INI format into a structured object.

This node parses a string containing structured data into an object that can be queried by other nodes like Property Getter or converted back to a string with Serializer.

Auto-Detection Logic#

When format is set to auto, the node tries to guess the format based on the first characters of the input string: - Starts with {: Assumes json. - Contains [: Assumes toml. - Contains =: Assumes ini. - Otherwise: Assumes yaml.

Note: The auto-detector might incorrectly identify a string starting with < as xml, but XML parsing is not supported, which will result in an error.

INI Parsing#

Due to the structure of INI files, the output is a nested object. However, a known issue causes only the last section of the INI file to be included in the output object. The structure will be: {"section_name": {"key1": "value1", "key2": "value2"}}.

Inputs#

Port Description
Execute
Triggers the node to start parsing.
Input
The input string to parse.
Format
The format of the input string.

Outputs#

Port Description
Success
Executed on a successful parse.
Error
Executed if parsing fails.
Object
The parsed object.

ID: core/parser@v1