PrivyJSON

Offline-first JSON/YAML operations toolkit

Overview

PrivyJSON is an offline-first JSON/YAML understanding and operations toolkit. It includes a Swift Package (library + CLI) and a SwiftUI workbench app for seamless JSON and YAML manipulation natively on your macOS and iOS devices.

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

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