Master JSON Config Builder

Generates Target and Palette JSONs from 3 parallel lists.

JSON Masterplan (Beta) Nickname: ConfigJSON

Overview

Generates Target and Palette JSONs from 3 parallel lists.

Inputs (3)

  • Programs (Text): Names of the architectural programs.
  • Targets (Number): Target area numbers (0 will be ignored).
  • Colors (Colour): System.Drawing.Color from GH Swatches.

Outputs (2)

  • JSON_Targets (Text): Connect to the Dashboard's TargetJSON input.
  • JSON_Palette (Text): Connect to the OOP Engine's ColorPalette input.

Method, assumptions and simplifications

The same notes appear in the component's Info output.

Method

  1. Reads three parallel lists: Programs, Targets and Colors, matched by index.
  2. JSON_Targets maps each program name (trimmed) to its target area; targets of zero or less, and programs without a target, are left out.
  3. JSON_Palette maps each program name to its colour as an R, G, B array (alpha dropped).

Assumptions

  • Program names are unique and match the program names used in the masterplan payload; targets are in m².

Simplifications and limits

  • A repeated program name keeps the last value. Lists of different lengths are allowed (a warning shows in the status) and unmatched items are skipped.

Workflow

  • JSON_Targets -> TargetJSON of Masterplan Dashboard. JSON_Palette -> ColorPalette of JSON MP Engine V2.