Overview
- Skill Key
- datadrivenconstruction/json-parser
- Author
- datadrivenconstruction
- Source Repo
- openclaw/skills
- Version
- -
- Source Path
- skills/datadrivenconstruction/json-parser
- Latest Commit SHA
- a519c6d95111e2da8d4ed8a5d5690fd518c769a2
Parse and validate JSON data from construction APIs, IoT sensors, and BIM exports. Transform nested JSON to flat DataFrames.
Stars
0
Installs
0
Status
ACTIVE
Visibility
PUBLIC
直接复制以下提示词,发送给你的 AI 助手即可完成安装。
请先检查是否已安装 SkillHub 商店,若未安装,请根据 https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/skillhub.md 安装 SkillHub 商店,然后安装 json-parser 技能。 若已安装,则直接安装 json-parser 技能。
# JSON Parser for Construction Data
## Overview
Construction systems increasingly use JSON for data exchange - from IoT sensors to BIM metadata exports. This skill handles parsing, validation, and flattening of JSON structures.
## Python Implementation
```python
import json
import pandas as pd
from typing import Dict, Any, List, Optional, Union
from dataclasses import dataclass
from pathlib import Path
@dataclass
class JSONParseResult:
"""Result of JSON parsing operation."""
success: bool
data: Any
errors: List[str]
record_count: int
class ConstructionJSONParser:
"""Parse JSON data from construction sources."""
def __init__(self):
self.errors: List[str] = []
def parse_file(self, file_path: str) -> JSONParseResult:
"""Parse JSON from file."""
try:
with open(file_path, 'r', encoding='utf-8') as f:
data = json.load(f)
return JSONParseResult(True, data, [], self._count_records(data))
except json.JSONDecodeError as e:
return JSONParseResult(False, None, [f"JSON Error: {e}"], 0)
except Exception as e:
return JSONParseResult(False, None, [str(e)], 0)
def parse_string(self, json_string: str) -> JSONParseResult:
"""Parse JSON from string."""
try:
data = json.loads(json_string)
return JSONParseResult(True, data, [], self._count_records(data))
except json.JSONDecodeError as e:
return JSONParseResult(False, None, [f"JSON Error: {e}"], 0)
def _count_records(self, data: Any) -> int:
"""Count records in data."""
if isinstance(data, list):
return len(data)
elif isinstance(data, dict):
return 1
return 0
def flatten_json(self, data: Dict, prefix: str = '') -> Dict[str, Any]:
"""Flatten nested JSON to single-level dict."""
flat = {}...
openstockdata
OpenClaw Skill for stock data analysis
capt-marbles
Generative Engine Optimization (GEO) for AI search visibility. Optimize content to appear in ChatGPT, Perplexity, Claude, and Google AI Overviews. Use when optimizing websites, pages, or content for LLM discoverability and citation.
capgoblin
Access unsecured credit lines for AI agents on the Arc Network using the Credex Protocol. Use for borrowing USDC against reputation, repaying debt to grow credit limits, providing liquidity as an LP, or managing cross-chain USDC via Circle Bridge. Triggers on "borrow from credex", "repay debt", "deposit to pool", "check credit status", "provide liquidity", or any credit/lending task on Arc.
capt-marbles
Control PhantomBuster automation agents via API. List agents, launch automations, get output/results, check status, and abort running agents. Use when the user needs to run LinkedIn scraping, Twitter automation, lead generation phantoms, or any PhantomBuster workflow.
camelsprout
DuckDB CLI specialist for SQL analysis, data processing and file conversion. Use for SQL queries, CSV/Parquet/JSON analysis, database queries, or data conversion. Triggers on "duckdb", "sql", "query", "data analysis", "parquet", "convert data".
camohiddendj
DuckDuckGo HTML search scraper CLI with JSON, CSV, OpenSearch, markdown, and compact outputs.