Scan your whole stack
From OX Research Newsroom
Are you using jsondoctor?
Find out what’s in your code.
Scan your apps free in minutes (opens in a new tab)Latest version: v1.0.0
jsondoctor was last scanned on 23 Nov 2026 at version 1.0.0. Risk score 0 of 100. No malicious behavior was detected.
| Version | Published | Status |
|---|---|---|
| 1.0.0 LATEST | 23 Nov 2026 | No rules fired |
| 0.0.0-stage | 23 Nov 2026 | Not shown |
Findings for v1.0.0. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.
The score describes 1.0.0; other versions have their own rules, not their own score.
The publisher’s own README, as collected from the registry.
The Complete JSON Debugging & Analysis Toolkit
JSONDoctor
Understand your JSON. Detect its problems.
Compare its structure. Transform it confidently.
JSONDoctor is a standalone JavaScript library and CLI for inspecting, validating, comparing, repairing, and transforming JSON. It runs entirely offline.
Package name on npm: jsondoctor\
(jsondoctor-js was also unused; this project uses jsondoctor so the install name matches the jsondoctor binary.)
Requires Node.js 18.18+.
JSON is everywhere: APIs, configs, databases, tests. Developers still spend time on trailing commas, opaque parse errors, huge nested payloads, and “what actually changed?” diffs. JSONDoctor puts those jobs in one toolkit with structured results instead of log-only helpers.
$, dots, indices, brackets, [*])--json, and no accidental overwritesnpm install jsondoctor
Global CLI (optional):
npm install -g jsondoctor
import JSONDoctor, { validate, compare, flatten, get } from 'jsondoctor';
const result = JSONDoctor.validate('{"name":"John","age":22}');
// { valid: true, error: null, data: { name: "John", age: 22 } }
JSONDoctor.format('{"user":{"name":"John"}}');
JSONDoctor.compare(oldData, newData);
JSONDoctor.get(data, '$.user.profile.email');
| API | Accepts |
|---|---|
validate, diagnose, repair |
JSON strings only |
format, minify |
JSON string or parsed JSON value |
compare, diff, flatten, get, stats, validateSchema |
Parsed JSON values, or JSON strings that will be parsed first |
unflatten |
Flat object of path keys |
On invalid syntax, format / minify / compare / etc. throw InvalidJsonError with line and column. validate never throws for bad JSON; it returns { valid: false, error }.
JSONDoctor.validate('{"name":"John",}');
// {
// valid: false,
// error: { message, line, column, position, rawMessage },
// data: null
// }
Uses JSON.parse as the authoritative parser. Trailing commas, unquoted keys, and invalid escapes fail because native parsing fails.
Default indent is 2. indent may be 4 or a string such as '\t'.
JSONDoctor.compare(
{ name: 'John', age: 22, address: { city: 'Delhi', country: 'India' } },
{ name: 'John', age: 23, address: { city: 'Mumbai', country: 'India' }, active: true }
);
Returns added, removed, modified, optional unchanged paths, and summary.
Options:
caseSensitiveKeys (default true)ignoreKeysignorePaths — exact paths, $.meta.*, $.features[*].temp, or $.features.[].tempignoreArrayOrder (opt-in; default comparison is index-based)includeUnchanged (default true)maxDepth (default 64)Reordered arrays are not equal unless ignoreArrayOrder is set.
Same engine as compare, with a changes[] list (added / removed / modified) and counts.
Diagnosis is not a repair. Repair only:
It will not invent missing values or close ambiguous structures. Success:
{
success: true,
original: '...',
repaired: '...',
changes: [],
warnings: []
}
JSONDoctor.flatten({
user: { profile: { name: 'John', age: 22 } },
active: true
});
// { "user.profile.name": "John", "user.profile.age": 22, active: true }
Arrays use [index]. Keys containing ., \, [, or ] are backslash-escaped so round-trips stay reversible. Conflicting paths throw TransformationConflictError instead of overwriting.
Documented JSONPath subset (not the full standard):
$.user.name$.users[0].email$.products[2].price$['user']['name']$.users[*].nameMissing paths return undefined. Wildcards return an array.
JSON Schema draft-07 via Ajv. Syntax-valid JSON can still fail schema checks.
Counts objects, keys, arrays, array items, strings, numbers, booleans, nulls, empty containers, max depth, UTF-8 serialized size, and the largest nested sections.
jsondoctor validate ./data.json
jsondoctor format ./data.json
jsondoctor minify ./data.json
jsondoctor compare ./old.json ./new.json
jsondoctor diff ./old.json ./new.json
jsondoctor diagnose ./broken.json
jsondoctor repair ./broken.json --out ./fixed.json
jsondoctor flatten ./data.json
jsondoctor stats ./data.json
jsondoctor schema ./data.json ./schema.json
jsondoctor get ./data.json "$.user.name"
--json prints machine-readable output. --out writes a file; existing files are not replaced unless you also pass --overwrite.
Exit codes: 0 success, 1 invalid JSON / failed repair / schema or compare inequality, 2 usage or missing file / refused overwrite.
Typed errors: InvalidJsonError, InvalidInputTypeError, InvalidPathError, InvalidSchemaError, UnsupportedRepairError, MaxDepthExceededError, TransformationConflictError, FileOperationError.
eval, no Function, no execution of JSON as code__proto__, constructor, and prototypeignoreArrayOrder is enabledignoreArrayOrder uses greedy deep-equality matching, not a minimum-edit assignmentnpm test
node examples/complete-demo.js
npx jsondoctor validate tests/fixtures/valid.json
MIT. See LICENSE and CONTRIBUTING.md.
Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.
The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).
The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.