Skip to main content

JSON: Data model

Enforce a given data model for an object

Parameters

Keys

The keys to add the values to. The list may be left empty: an empty model is valid and produces an empty object.

Keyrequired
The key to add the value to.
Label

The label displayed on the attribute's input connector. It defaults to "<key> (<type>)".

Value typerequired
The type of the value you want to add.
Multiple
The key input accepts multiple values.
Requirement

What happens when the attribute's input receives no value. "Mandatory" (default): a missing value fails the step. "Optional": the key is simply omitted from the output object. "Optional to Null": the key is set to JSON null. Non-mandatory attributes also mark their input connector as optional.

JSON base

The initial JSON object to which you want to add the values.

Parent key

The parent key to attach the final JSON object to. If not provided (or left empty), the values are added directly to the root of the JSON object.

Input

One connector per key

Each key you defined in the parameters exposes its own input connector (Single, or Unlimited when "Multiple" is checked). Incoming values are checked against the declared value type with no coercion: a value of the wrong type fails the step with an InvalidType error.

Output

JSON Element
The JSON object with the added values.