PrivyJSON

Inspect, transform, validate, and patch structured data without leaving your machine.

Overview

PrivyJSON is an offline-first JSON and YAML operations toolkit for developers who need dependable structured-data workflows. It combines a native workbench, Swift package, and CLI for parsing, conversion, selection, diffing, patching, and schema validation.

Features

  • Parse & Convert — Seamless JSON ↔ YAML conversion
  • JSONPath Support — Powerful recursive descent selector queries
  • JSON Patch — RFC6902 support for modifying documents
  • JSON Schema — Generate schemas from data and run fully offline validation
  • Structural Diff — Lightweight path-based differences
  • Batch Operations — Apply patches to multiple documents via CLI

Advantages

PrivyJSON keeps structured data work local and repeatable. You can use the app for interactive inspection, the CLI for scripts, and the Swift package for integration without depending on web formatters or uploading sample payloads to external tools.

Benefits

Debug API payloads, validate contracts, compare changes, and run batch transformations faster while keeping production examples, customer payloads, and internal schemas on your machine.

Command-Line Interface

PrivyJSON ships as a first-class command-line tool in the Swift package, and is also embedded directly in the macOS app bundle at Contents/Resources/bin/privyjson. It brings your data operations directly to the terminal:

  • Core Workflows — Run parse, convert, select, diff, patch, and validate from your terminal.
  • Schema Generation — Use infer-schema to generate JSON Schema directly from JSON or YAML inputs.
  • Batch Patching — Use batchpatch to preview and apply one patch across multiple files simultaneously.

Examples

# Convert JSON to YAML
privyjson convert --from json --to yaml --in Samples/sample.json --out /tmp/out.yaml

# Convert YAML to JSON
privyjson convert --from yaml --to json --in Samples/sample.yaml --out /tmp/out.json

# Infer schema from JSON
privyjson infer-schema --in Samples/sample.json --format json

# Infer schema from YAML and save to file
privyjson infer-schema --in Samples/sample.yaml --format yaml --out /tmp/schema.json

Requirements

  • macOS for the native app
  • No AI provider required — JSON/YAML parsing, conversion, selection, patching, diffing, and validation run locally.
  • Swift toolchain — Required only when using the Swift package or building the CLI from source.