Bytepliers JSON tools: types, JSONPath, schema, merge, flatten
Reference for the 10 Bytepliers JSON tools: JSON → Types, JSONPath, JSON Table, JSON Compare, Flatten, Merge, Schema Generator and Validator, Stringify, JSON Lines.
Updated 5 min read
On this page
The JSON group holds tools that work on JSON documents. The JSON Formatter itself is in the Format group. For the other groups, see the Bytepliers tools list.
| Tool | Id | Subtitle |
|---|---|---|
| JSON → Types | jsonTypes | Generate Swift Codable structs and TypeScript interfaces |
| JSONPath | jsonPath | Query JSON with JSONPath expressions and filters |
| JSON Table | jsonTable | View a JSON array of objects as a table |
| JSON Compare | jsonPatch | Structural JSON diff, JSON Patch and Merge Patch |
| JSON Flatten | jsonFlatten | Flatten nested JSON to dotted keys and back |
| JSON Merge | jsonMerge | Deep-merge JSON documents with array strategies |
| JSON Schema Generator | jsonSchema | Infer a JSON Schema from sample documents |
| JSON Schema Validator | jsonSchemaValidate | Validate JSON against a schema, errors by path |
| JSON Stringify | jsonStringify | Turn JSON into an escaped string literal and back |
| JSON Lines | jsonLines | NDJSON / JSON Lines to arrays and back, line by line |
Things the seven 1.1 tools in this group (Flatten to JSON Lines) share:
- Lenient parsing: comments, trailing commas and similar mistakes are accepted, as in the JSON Formatter's Lenient mode. JSON Lines input is the exception: each line must be strict JSON.
- Size limit: 24 MB of input, worked on in the background. A "Working…" label shows on large inputs.
- Options: kept while the window is open, not between launches.
JSON → Types
Id jsonTypes.
- Language: Swift (default) or TypeScript.
- Root type: defaults to "Root".
- Swift Properties: let (default) or var.
- TypeScript Declare as: interface (default) or type.
- How types are inferred: array elements are merged. Missing keys and
nullvalues become optional, and Int mixed with Double becomes Double. - Swift details: camelCase properties, with
CodingKeysadded when needed. - Limit: 2 MB.
- Transforms: JSON → Swift Types, JSON → TypeScript Types.
JSONPath
Id jsonPath.


- Supported syntax: a subset of RFC 9535: names, wildcards, negative indexes, unions, slices,
..descendants and[?(…)]filters with comparisons and&& || !. - Not supported: function extensions such as
length(). - Output: each match with its normalized path. Copy Values gives a JSON array; Copy Paths copies the paths.
- Limit: the list shows up to 1,000 matches.
- Transform: JSONPath Query.
JSON Table
Id jsonTable.


- Input: a JSON array of objects,
{ "data": [ … ] }, or an array of arrays. - Table: up to 1,000 rows. Columns are every key found, in first-seen order.
- Flatten nested objects: on by default, up to 8 levels.
- Export: Copy CSV and Copy Markdown.
JSON Compare
Id jsonPatch. A separate tool, not a mode of Text Diff.
- Compare (default): Output is a list of changes (default), a JSON Patch (RFC 6902) or a Merge Patch (RFC 7386). Key order, whitespace and number formatting are ignored, and array items are compared by position.
- Apply Patch: applies a JSON Patch (an array) or a Merge Patch (an object) to a document.
JSON Flatten
Id jsonFlatten. New in 1.1.
- Mode: Flatten (default) turns nested JSON into one object of path keys. Unflatten turns it back. Swap feeds the output back in the other direction.
- Arrays:
a[0].b(Brackets, default) ora.0.b(Dots). When unflattening,[n]and all-digit segments become array indexes. - Options menu: Separator Dot (default), Underscore, Double Underscore, Slash, Colon or Hyphen, and Keep Empty Objects and Arrays (on).
- Awkward keys: a key that contains the separator,
[or]is written as["key"], so it survives a round trip. - Transform: Flatten JSON (
json-flatten).
JSON Merge
Id jsonMerge. New in 1.1.
- Inputs: Base and Overlay. Separate extra documents in Base with
---lines. Later documents win. Swap Base and Overlay switches the two panes. - Arrays: Replace (default, the later array wins), Concatenate, Merge by Index (deep-merges item by item) or Unique (appends without duplicates).
- Options menu: Null Removes the Key and Sort Keys, both off.
- Overwritten list: every value that was replaced, with its JSON Pointer path, old value, new value and which document changed it. Equal values and array appends don't count. The list shows the first 1,000.
JSON Schema Generator
Id jsonSchema. New in 1.1.
- Draft: 2020-12 (default) or Draft-07.
- Options menu: Detect Formats (date-time, email, uri, uuid and more, on), Mark Keys Seen in Every Sample as Required (on), Enums for Small Repeated String Sets (off), Disallow Additional Properties (off) and Treat a Top-Level Array as Samples (off).
- Several samples: separate documents with
---lines and the schema covers all of them. - How it infers: integer mixed with number becomes number, and a key that is sometimes
nullbecomes["type", "null"]. An enum is made only when values repeat and there are at most 6 distinct ones. A detected format wins over an enum.
JSON Schema Validator
Id jsonSchemaValidate. New in 1.1.
- Inputs: JSON and Schema side by side. The verdict chip shows Valid or the number of errors.
- Errors list: each error with its path, message and keyword. Click one to select it. Copy Message and Copy Path are in the right-click menu. Up to 500 errors are listed.
- Option: Check Formats (email, date-time, uri, uuid and more), on by default.
- Supported: drafts 2020-12 and Draft-07, with local
$ref. Apatternuses ICU regular expressions, which match ECMA-262 for common patterns. - Not supported: remote
$ref(it's reported, not fetched). Unknown formats are treated as annotations.
JSON Stringify
Id jsonStringify. New in 1.1.
- Mode: Stringify (default) wraps JSON in an escaped string literal. Parse reads a string literal back into JSON.
- Quotes (Stringify): JSON (default), Single Quotes, Template Literal, Swift or Swift Raw.
- Options: Minify Before Quoting (on) and Escape Non-ASCII Characters (off).
- From the clipboard: text that looks like stringified JSON, such as
"{\"a\":1}", opens here in Parse mode.
JSON Lines
Id jsonLines. New in 1.1.
- Mode: Lines → Array (default) or Array → Lines. Swap converts the output back.
- Key filter: type comma-separated top-level keys. With Keep Keys (default) only those keys stay, in that order. With Drop Keys they are removed. ⎋ clears the field.
- Options menu: Pretty-Print the Array (on) and Skip Invalid Lines (off).
- Invalid lines: each line is strict JSON. Bad lines are listed with their line number (up to 1,000). Unless Skip Invalid Lines is on, a bad line stops the conversion.
- Files:
.ndjsonand.jsonlfiles opened from Finder land here. - Transform: JSON Lines → Array (
jsonl-to-json).
Related
- Bytepliers tools list
- JSON Formatter in Bytepliers
- Convert tools
- Generate tools (Mock JSON and Fake Data)