JSON Processor Pack
★Trustedv1.0.0MIT✔Verified88by AgentNode · published 25 days ago · toolpack
Parse, transform, query, and validate JSON data structures.
JMESPath queries, schema validation, and structural transformations for JSON.
Quick Start
agentnode install json-processor-packUsage
From packagefrom json_processor_pack.tool import run
api_response = {
"data": {
"users": [
{"id": 1, "name": "Alice Chen", "role": "admin", "active": True, "logins": 142},
{"id": 2, "name": "Bob Patel", "role": "editor", "active": True, "logins": 87},
{"id": 3, "name": "Carol Wu", "role": "admin", "active": False, "logins": 12},
{"id": 4, "name": "Dave Kim", "role": "viewer", "active": True, "logins": 234}
],
"total": 4,
"page": 1
}
}
# JMESPath query: get names of active admins
result = run(
action="process_json",
operation="query",
data=api_response,
jmespath="data.users[?role=='admin' && active].name"
)
print(f"Active admins: {result['result']}")
# Active admins: ['Alice Chen']
# Flatten the nested structure
flat = run(
action="process_json",
operation="flatten",
data=api_response,
separator="."
)
for key, value in flat["result"].items():
print(f" {key}: {value}")Verification
Package installs and imports correctly. runtime checks passed.
This package was executed and validated by AgentNode before listing. Install, import, and runtime checks passed.
Last verified 21d ago· Runner v2.0.0
Use this when you need to...
- ›Query nested API responses using JMESPath expressions
- ›Validate webhook payloads against JSON Schema definitions
- ›Flatten deeply nested JSON into tabular row format
- ›Merge and diff two JSON configuration files
- ›Transform JSON data structures with field mapping and renaming
README
JSON Processor Pack
Parse, transform, query, and validate JSON data structures. Powered by JMESPath queries, JSON Schema validation, and structural transformations.
Quick Start
agentnode install json-processor-pack
from json_processor_pack.tool import run
result = run(
action="process_json",
operation="query",
data={"users": [{"name": "Alice"}, {"name": "Bob"}]},
jmespath="users[].name"
)
print(result["result"]) # ['Alice', 'Bob']
Usage
JMESPath Query
result = run(
action="process_json",
operation="query",
data=nested_data,
jmespath="items[?status=='active'].{id: id, name: name}"
)
Schema Validation
result = run(
action="process_json",
operation="validate",
data={"name": "Alice", "age": 30},
schema={"type": "object", "required": ["name", "age"]}
)
print(f"Valid: {result['valid']}")
Diff Two JSON Objects
result = run(
action="process_json",
operation="diff",
data={"a": 1, "b": 2, "c": 3},
target={"a": 1, "b": 5, "d": 4}
)
for change in result["changes"]:
print(f"{change['type']}: {change['path']}")
API Reference
| Capability | Description |
|---|---|
process_json | Query, validate, transform, and diff JSON data |
Operations: query (JMESPath), validate (JSON Schema), flatten, unflatten, diff, merge, transform
License
MIT
Version History
Capabilities
Permissions
This package declares the following access levels. Review before installing.
agentnode install json-processor-packFiles (3)
License
MITStats
Compatibility
Frameworks
Runtime
pythonPython Version
>=3.10Trust & Security
Publisher
AgentNode
@agentnode