Make JSON Array

From Visuino
Jump to navigation Jump to search

File:TArduinoMakeJSONArray.png

Summary

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

Description

The **Make JSON Array** component generates a JSON array 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 item in the output JSON array. 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 enables powerful, type-sensitive array construction routines—especially helpful when encoding structured data 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 array: “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 array.
  • Clock – A clock signal pin; triggers generation of the JSON output.
  • Out – Outputs the assembled JSON array as a text string.