Skip to content
bobmatnyc avatar

Json Data Handling

Generic JSON handling guide covering Python and JavaScript parsing, serialization, and validation patterns.

CCM score
48 of 100
skills.sh installs
412
GitHub stars
79
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers parsing and serializing in Python (json) and JavaScript (JSON.parse, JSON.stringify), including file read and write
  • Includes custom encoders for datetimes, circular-reference replacers, key transforms, deep merge, and safe nested access
  • Enforces validation with jsonschema and warns against eval() and parsing untrusted input without checks
  • Designed for developers who need a quick reference for common JSON tasks, plus ijson streaming for large files

Install

$ npx -y skills add bobmatnyc/claude-mpm-skills --skill json-data-handling -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

JSON Data Handling

Working effectively with JSON data structures.

Python

Basic Operations

import json

# Parse JSON string
data = json.loads('{"name": "John", "age": 30}')

# Convert to JSON string
json_str = json.dumps(data)

# Pretty print
json_str = json.dumps(data, indent=2)

# Read from file
with open('data.json', 'r') as f:
    data = json.load(f)

# Write to file
with open('output.json', 'w') as f:
    json.dump(data, f, indent=2)

Advanced

# Custom encoder for datetime
from datetime import datetime

class DateTimeEncoder(json.JSONEncoder):
    def default(self, obj):
        if isinstance(obj, datetime):
            return obj.isoformat()
        return super().default(obj)

json_str = json.dumps({'date': datetime.now()}, cls=DateTimeEncoder)

# Handle None values
json.dumps(data, skipkeys=True)

# Sort keys
json.dumps(data, sort_keys=True)

JavaScript

Basic Operations

// Parse JSON string
const data = JSON.parse('{"name": "John", "age": 30}');

// Convert to JSON string
const jsonStr = JSON.stringify(data);

// Pretty print
const jsonStr = JSON.stringify(data, null, 2);

Details

Repository
github.com/bobmatnyc/claude-mpm-skills
Categories
Backend & APIs, Python
First seen
Jun 3, 2026

Questions

What does the json-data-handling skill do for Claude Code?

The json-data-handling skill gives the agent working patterns for JSON data in Python and JavaScript. It covers parsing and writing JSON, pretty printing, custom encoders, schema validation with jsonschema, deep merges, safe nested access, key case conversion, and streaming large files with ijson.

How do I install the json-data-handling skill?

Run npx -y skills add bobmatnyc/claude-mpm-skills --skill json-data-handling -y in your project. Once installed, the agent can apply these JSON handling patterns to data and database work in that project.

Where does json-data-handling rank in the Backend & APIs category?

Claude Marketplaces lists json-data-handling in the Backend & APIs category, alongside entra-app-registration, neon, firebase-basics, firebase-auth-basics and workers-best-practices. Those are the other skills it sits with in that category. Its focus is on JSON data itself rather than a specific backend platform.

More from bobmatnyc/claude-mpm-skills

All 154

Similar to Json Data Handling

More Backend & APIs