Data Converter icon

Data Converter

Convert between various data formats - Base64, Binary, JSON, XML, YAML, CSV, HTML, and more

Overview

The node converts data from YAML format to JSON format. It takes YAML input as a string and parses it into a JSON object. This operation is useful when you need to integrate or process YAML data within workflows that primarily work with JSON, such as APIs, databases, or other systems expecting JSON input.

Practical examples:

  • Converting configuration files written in YAML into JSON for further processing.
  • Parsing YAML responses from webhooks or APIs into JSON to use in subsequent workflow steps.
  • Transforming YAML-formatted data files into JSON for data analysis or storage.

Properties

Name Meaning
Input Data The YAML data string to convert to JSON.
Binary Property Name (Optional) Name for the output binary property if outputting binary data (not typical here).

Output

The output is a JSON object representing the parsed YAML content. The json field contains this converted data structure.

If the node is configured to output binary data (not common for YAML to JSON), the binary output will contain the JSON data serialized appropriately.

Dependencies

  • No external API keys or services are required.
  • The node uses internal utility functions to parse YAML to JSON.
  • No special environment variables or n8n configurations are needed.

Troubleshooting

  • Invalid YAML syntax: If the input YAML is malformed, the node will throw an error indicating parsing failure. Ensure the YAML input is valid and properly formatted.
  • Empty input: Providing empty or missing YAML input will likely result in an error or empty JSON output.
  • Large YAML files: Very large YAML inputs might cause performance issues or timeouts depending on system resources.

To resolve errors, validate your YAML input using online validators or YAML linters before passing it to the node.

Links and References

Discussion