Make JSON Object

From Visuino
Revision as of 11:15, 11 August 2025 by Visuino (talk | contribs) (Created page with "Image:TArduinoMakeJSONObject.png == Summary == Use this component to construct a JSON-formatted text object from multiple typed inputs. == Description == The **Make JSON Object** component generates a JSON object string by assembling values from various typed input elements—such as text, boolean, integer, analog, null, object, array, and custom JSON entries. Each included element produces a corresponding field in the output JSON. When **Only Modified** is en...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

File:TArduinoMakeJSONObject.png

Summary

Use this component to construct a JSON-formatted text object from multiple typed inputs.

Description

The **Make JSON Object** component generates a JSON object string by assembling values from various typed input elements—such as text, boolean, integer, analog, null, object, array, and custom JSON entries. Each included element produces a corresponding field in the output JSON. When **Only Modified** is enabled, only elements that have changed since the last output are included, reducing output noise. The **Enabled** property toggles the component's operation: when disabled, it passes through input unmodified.

This component is especially useful for dynamically building structured JSON payloads for APIs, web services, or serial output—ensuring only relevant changes are transmitted or logged.

Diagram:

Categories

Properties

  • Enabled – Toggle the component’s functionality on or off.
  • Elements – Defines the types of elements to include in the JSON object: “Text/String Element”, “Digital/Boolean Element”, “Integer Element”, “64 bit Integer Element”, “Unsigned Element”, “64 bit Unsigned Element”, “Analog Element”, “Null Element”, “Object Element”, “Array Element”, “Custom JSON Element”.
  • Only Modified – When enabled, output includes only elements whose values have changed since the last emission.

Pins

  • Pins for each configured element type (e.g., Text, Boolean, Integer…) – provide input values that are assembled into the JSON object.
  • Clock – A clock signal pin; triggers generation of the JSON output.
  • Out – Outputs the assembled JSON object as a text string.