JSON Metadata Inspector
Extracts all unique filter keys from any MP Engine JSON.
Overview
Extracts all unique filter keys from any MP Engine JSON.
Inputs (1)
- MP_JSON (Text): Any JSON stream (Masses, Slabs, Roofs, Railings, Facades).
Outputs (5)
- Buildings (Text): Unique Building IDs.
- Towers (Text): Unique Tower IDs.
- Programs (Text): Unique Program names.
- Types (Text): Unique element types (e.g., Roof classifications).
- Levels (Integer): Unique floor indices, sorted numerically.
Method, assumptions and simplifications
The same notes appear in the component's Info output.
Method
- Parses MP_JSON as a JSON object whose top-level keys are building IDs.
- If a building value is an object, its keys are read as program names and each array item is scanned for tower_id, floor_index and type. If it is an array, each item is scanned for tower_id, program, programs_above, type and floor_index.
- Unique values are returned sorted: Buildings, Towers, Programs, Types and Levels (integers); floor_index values that are not whole numbers are skipped with a warning.
Assumptions
- The JSON follows the MP Engine masterplan schema (building, then program, then floor items).
Simplifications and limits
- Only two nesting levels are read; other keys are ignored.
Workflow
- MP Engine JSON text -> MP_JSON; outputs -> value lists for filtering the JSON Masterplan components.