Serializer
Converts a data structure into a string using a specified format.
Converts a data structure (like a map or a list) into a text-based string format. This is useful for saving data to a file or sending it over a network.
Supported Formats#
- JSON: JavaScript Object Notation. Widely used and human-readable. Output is indented for clarity.
- YAML: YAML Ain't Markup Language. A human-friendly data serialization standard.
- TOML: Tom's Obvious, Minimal Language. A minimal configuration file format.
- INI: A common configuration file format.
INI Format Requirements#
When serializing to the INI format, the input data structure must be a map where each key is a section name, and its value is another map of key-value pairs.
Example Input for INI: ```json { "database": { "host": "localhost", "port": "5432" }, "user": { "name": "admin" } }
Inputs#
| Port | Description |
|---|---|
| Executes the node. | |
| The data structure to serialize. | |
| The serialization format to use. |
Outputs#
| Port | Description |
|---|---|
| Executes if serialization is successful. | |
| Executes if serialization fails. | |
| The serialized string. |
ID: core/serializer@v1