json-parser_skill

This skill parses and validates construction JSON, flattens nested structures, and converts data into flat DataFrames for analysis.
  • Python

2.6k

GitHub Stars

4

Bundled Files

2 months ago

Catalog Refreshed

4 months ago

First Indexed

Readme & install

Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.

Installation

Preview and clipboard use veilstrat where the catalogue uses aiagentskills.

npx veilstrat add skill openclaw/skills --skill json-parser

  • _meta.json468 B
  • claw.json493 B
  • instructions.md1.2 KB
  • SKILL.md7.8 KB

Overview

This skill parses, validates, and transforms JSON from construction APIs, IoT sensors, and BIM exports into tabular formats. It flattens nested structures, counts records, and provides targeted extractors for BIM elements and sensor readings. Use it to convert varied JSON payloads into pandas DataFrames for analysis and downstream workflows.

How this skill works

The parser accepts JSON strings or files, returns a structured parse result with success, data, errors, and record count, and can flatten nested dictionaries and lists to single-level keys. Specialized subclasses handle BIM exports (extracting elements and properties) and IoT sensor payloads (normalizing sensor_id, timestamp, value, unit, location). It also supports schema validation against required field lists and dot-path extraction of nested elements.

When to use it

  • Ingesting BIM export files (Revit, IFC-derived JSON) to build element tables for schedules or QA.
  • Consolidating IoT sensor batches into time-series DataFrames for analytics or monitoring.
  • Converting API responses with nested JSON into flat rows for ETL pipelines and reporting.
  • Validating JSON payloads against required fields before loading into a database.
  • Extracting targeted nested elements using dot notation paths for quick queries.

Best practices

  • Validate incoming JSON with validate_schema before heavy processing to catch missing fields early.
  • Prefer parse_file for local files and parse_string for API responses to centralize error handling.
  • Use to_dataframe after flatten_json to ensure consistent columns across records.
  • For inconsistent lists, inspect flatten results to decide whether to normalize lists into repeated rows or keep as arrays.
  • Use BIMJSONParser.extract_properties to pull common property containers into flat columns.

Example use cases

  • Load a Revit export, flatten element attributes, and produce a construction schedule in a DataFrame.
  • Normalize hourly IoT sensor batches into a time-series table with sensor_id, timestamp, value, and unit.
  • Convert mixed API responses (nested dicts and lists) into columnar format for ingestion to a data warehouse.
  • Run schema checks on incoming device telemetry to log missing fields and compute completeness percentages.

FAQ

Lists of primitives are kept as arrays under a single key; lists of dicts are expanded by index into separate flattened keys (key_0_key, key_1_key, etc.).

What if JSON keys vary across records?

to_dataframe collects all flattened keys across records into columns; missing values appear as nulls, so inspect the combined schema and post-process as needed.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational