Reference
JSON Glossary
This JSON glossary covers 27 essential JSON terms — from core data types to advanced specifications like JSON Patch, JSONPath, and JWT. Alphabetically sorted with practical notes and links to the relevant tools.
Jump to term
JSON
JavaScript Object Notation — a lightweight, text-based data interchange format defined by RFC 8259. JSON encodes structured data as human-readable text using six value types: strings, numbers, booleans, null, objects, and arrays. Despite the name, JSON is language-independent and is the de-facto standard for web APIs worldwide. It largely replaced XML because it is more compact, easier to read, and natively understood by JavaScript. Every conforming JSON document must be valid UTF-8, use double-quoted strings, and contain no trailing commas or comments. Use the Validator to check syntax, or the Fixer to repair malformed documents.
JSON Array
An ordered, comma-separated list of values enclosed in square brackets: ["a", 1, true, null]. Array elements can be any valid JSON value, including nested objects and arrays, and do not need to be of the same type. Unlike JavaScript arrays, JSON arrays have no methods — they are pure data. A JSON array with a trailing comma after the last element is invalid and will cause a parse error. Use the JSON Fixer to remove trailing commas automatically.
JSON Beautification
Also called pretty-printing or formatting — the process of adding consistent indentation, newlines, and spacing to minified or single-line JSON to make it human-readable. Beautification does not change the data; only the whitespace changes. Most JSON serializers accept an indentation argument (e.g. JSON.stringify(data, null, 2) in JavaScript). Beautification is the essential first step when debugging any unknown JSON payload — structure becomes immediately visible. Use the AI JSONMedic Formatter to beautify any JSON instantly with configurable indentation and optional key sorting.
JSON Boolean
JSON booleans are the lowercase literals true and false. Capitalized variants (True, False) are valid Python but invalid JSON. This is one of the most frequent errors in AI-generated JSON — language models trained on Python code output Python booleans constantly. Similarly, Python's None is not valid JSON; the correct value is null. The AI JSONMedic Fixer automatically converts Python-style booleans and None to their valid JSON equivalents using word-boundary matching so it does not corrupt string values.
JSON Deserialization
The process of converting a JSON string into a native data structure in a programming language — the reverse of serialization. JSON.parse() in JavaScript, json.loads() in Python, and JsonSerializer.Deserialize() in C# are all deserialization operations. Deserialization fails immediately when the input string is not valid JSON, throwing a SyntaxError, JSONDecodeError, or equivalent. When a strict parser fails, AI JSONMedic can repair the input first — then you retry deserialization on the fixed JSON. Use the Fixer to prepare input for a clean parse.
JSON Diff
A comparison of two JSON documents that highlights which values were added, removed, or changed. Unlike plain-text diffs, a JSON-aware diff understands structure — it can identify that a value type changed from string to integer, or that a key moved. JSON diff is useful for tracking API schema changes between versions, comparing AI model output before and after a prompt change, and debugging data pipeline transformations. Use the AI JSONMedic JSON Diff tool for side-by-side comparison powered by the Myers diff algorithm.
JSON-LD
JSON for Linked Data — a W3C standard that extends JSON with a @context mechanism to link data to shared vocabularies such as Schema.org. JSON-LD is the format Google recommends for structured data in web pages — search engines read the <script type="application/ld+json"> block to understand page content for rich results (FAQ panels, HowTo steps, breadcrumbs, articles). This glossary page itself uses JSON-LD to declare a DefinedTermSet schema, and the AI JSONMedic homepage uses it for WebApplication and HowTo markup. JSON-LD is valid JSON, so AI JSONMedic can validate it.
JSON Lines (NDJSON)
Also called NDJSON (Newline-Delimited JSON) — a format where each line of a text file is a valid, self-contained JSON object. The file as a whole is not valid JSON (there is no outer array wrapper), but each individual line is. JSON Lines is ideal for streaming data, log files, and machine learning training datasets because parsers can process one record at a time without loading the entire file into memory. OpenAI's fine-tuning data format is JSONL. File extension is typically .jsonl or .ndjson. Use the Validator to check individual lines.
JSON Linting
Static analysis of a JSON document to detect syntax errors and structural problems — without executing any code. A JSON linter validates syntax (correct use of quotes, commas, brackets) and reports error locations with line and column numbers. Linting differs from repair by intent: linting reports problems, repair fixes them. The combination is most useful: lint to understand what is wrong, then repair to get valid JSON. The AI JSONMedic Validator acts as a linter, and the Fixer performs repair — both in a single workflow.
JSON Merge Patch (RFC 7396)
A simpler alternative to JSON Patch for updating JSON documents. A merge patch is itself a JSON object: keys with non-null values overwrite the target's matching key; keys with a null value remove that key from the target; absent keys are left unchanged. Merge Patch is much easier to construct than JSON Patch but less expressive — it cannot represent array operations or insert-at-index semantics. Used in HTTP PATCH requests with Content-Type: application/merge-patch+json. GitHub's REST API uses Merge Patch for several resource update endpoints.
JSON Minification
The removal of all unnecessary whitespace — spaces, tabs, and newlines — from a JSON document to produce the most compact valid representation. Minified JSON is semantically identical to its formatted version. Useful for reducing API payload sizes, compressing stored JSON, and embedding JSON literals in source code. The trade-off is human readability — minified JSON is not practical to read or edit directly. AI JSONMedic's Minifier validates the JSON before compressing it and reports the exact byte reduction and compression percentage so you know precisely how much space you save.
JSON null
The JSON null literal — lowercase null— represents the intentional absence of a value. It is one of JSON's six primitive types and maps to null in JavaScript, None in Python, and nil in Go and Ruby. An important distinction: { "a": null } has the key a set to null, while {}does not have the key at all — these are semantically different. AI-generated JSON frequently uses Python's None instead of JSON's null; the Fixer corrects this.
JSON Number
JSON numbers cover integers and floating-point values in standard decimal notation: integers (42, -7), decimals ( 3.14), and scientific notation ( 1.5e10). Critically, JSON does not allow NaN, Infinity, or -Infinity— these are JavaScript runtime values with no JSON equivalent. Python's json module allows them by default, making Python-serialized JSON sometimes invalid for strict parsers. The AI JSONMedic Fixer converts NaN and Infinity to null during repair.
JSON Object
An unordered collection of key/value pairs enclosed in curly braces: { "key": "value", "count": 42 }. Keys must be double-quoted strings; values can be any JSON type. Key order is not guaranteed by the spec, though most modern parsers preserve insertion order in practice. Duplicate keys within a single object are technically allowed by RFC 8259 but produce undefined behavior in parsers — most keep only the last value, but behavior varies. Use the Validator to check for duplicate keys in critical data.
JSON Parser
A program that reads a JSON string and converts it into a native data structure. Most JSON parsers use recursive descent — they consume tokens one at a time and build up objects and arrays by recursing into nested structures. Parsers vary in strictness: some allow comments, trailing commas, or NaN/Infinity; strict parsers (the JavaScript runtime's built-in JSON.parse(), Python's json.loads()) reject all of these per RFC 8259. When a strict parser fails with a SyntaxError, AI JSONMedic can repair the input first, then retry parsing on the cleaned result.
JSON Patch (RFC 6902)
A format for describing changes to a JSON document as an array of operation objects. Each operation has an op field (add, remove, replace, move, copy, test) and a path using JSON Pointer notation. Example: [{"op":"replace","path":"/user/name","value":"Bob"}]. JSON Patch is used in HTTP PATCH requests and real-time collaboration systems to describe incremental changes without sending the entire document. Use the JSON Diff tool to understand what changed between two versions.
JSON Pointer (RFC 6901)
A string syntax for identifying a specific value within a JSON document using forward-slash notation: /users/0/name refers to the name field of the first element of the users array. The empty string "" refers to the root document. Tilde encoding is used to escape special characters: / becomes ~1, and ~ becomes ~0. JSON Pointer is used internally by JSON Patch for operation targets and by JSON Schema for $ref references.
JSON Repair
Automatic correction of a malformed JSON string into a valid, parseable JSON document. A repair engine applies a series of transforms — removing markdown wrappers, stripping encoding issues like BOM characters, converting Python booleans, removing trailing commas, inserting missing commas, fixing quote styles, quoting unquoted keys, and closing unclosed brackets from truncated output. Repair is inherently heuristic: when the input is ambiguous, the engine must make assumptions about intent and report what it changed. AI JSONMedic uses a 14-stage repair pipeline and produces a plain-English report of every change made, so you understand not just the fixed output but why each repair was applied.
JSON-RPC
A stateless, lightweight remote procedure call (RPC) protocol encoded in JSON. A JSON-RPC 2.0 request specifies a method name, parameters, and a request ID: {"jsonrpc":"2.0","method":"add","params":[1,2],"id":1}. The response returns the result or an error object with a code and message. JSON-RPC is transport-agnostic — commonly used over HTTP and WebSocket. It is used by the Ethereum blockchain JSON-RPC API, the Language Server Protocol (LSP) powering VS Code extensions, and various microservice architectures that prefer a simple RPC mechanism over full REST or gRPC.
JSON Schema
A vocabulary for describing the structure and constraints of JSON documents. A JSON Schema document specifies which fields are required, what type each field must be, acceptable value ranges, allowed string patterns, and nested object shapes. Libraries like Ajv (JavaScript), Pydantic (Python), and Zod (TypeScript) implement JSON Schema validation. JSON Schema underpins OpenAPI specifications for REST API documentation and is essential for data pipeline validation and configuration file contracts. Use the AI JSONMedic Validator to confirm your JSON is syntactically valid before schema validation — a malformed document will fail schema validation for the wrong reason.
JSON Serialization
The process of converting a native data structure — object, dict, class instance — into a JSON string. JSON.stringify() in JavaScript and json.dumps() in Python are the standard serialization functions. Serialization can produce non-standard output when data contains values with no JSON equivalent: circular references (error), undefined (omitted by JavaScript), NaN/Infinity (allowed by Python's json module but invalid per spec), and custom class instances without a serializer. The resulting string should always be validated before being sent to another system.
JSON String
A sequence of Unicode characters enclosed in double quotes. Single-quoted strings are not valid JSON — this is one of the most common causes of JSON parse errors in AI-generated and hand-written JSON. Certain characters must be escaped with a backslash: \" (double quote), \\ (backslash), \n (newline), \t (tab), \uXXXX (Unicode codepoint). Unescaped control characters (ASCII 0x00–0x1F) inside strings are not allowed. The AI JSONMedic Fixer converts single-quoted strings to double-quoted and handles common escape sequence issues.
JSONP
JSON with Padding — a legacy technique for cross-origin data requests that predates CORS. A JSONP response wraps JSON data in a JavaScript function call: callback({ "key": "value" }). The browser loads the response as a <script> tag, executing the callback with the data. JSONP is considered a security risk — it executes arbitrary JavaScript from third-party servers — and is largely obsolete. CORS headers and the Fetch API are the correct modern solution for cross-origin requests. JSONP responses are not valid JSON; they are valid JavaScript.
JSONPath
A query language for extracting values from JSON documents, analogous to XPath for XML. JSONPath expressions start with $ (the root) and use dot notation ($.store.book) or bracket notation ($['store']['book']). The wildcard * matches all children; [0] selects by index; filter expressions like $..book[?(@.price<10)] select matching items. JSONPath is used in AWS IAM policies, Kubernetes config selectors, n8n expressions, and testing frameworks. RFC 9535 (2024) provides a formal standardization.
JWT (JSON Web Token)
A compact, URL-safe token format defined by RFC 7519 that encodes claims as a JSON object signed with a cryptographic key. A JWT has three base64url-encoded parts separated by dots: header.payload.signature. The header specifies the algorithm (e.g. HS256, RS256); the payload contains claims (user ID, expiry, roles); the signature verifies integrity. JWTs are widely used for stateless authentication in REST APIs — the server verifies the signature without a database lookup. Important: the payload is base64-encoded, not encrypted. Anyone can decode and read it. Never store sensitive data in a JWT payload unless the token is also encrypted (JWE).
Malformed JSON
JSON that cannot be parsed by a strict RFC 8259 JSON parser. Common causes: trailing commas after the last element, single-quoted strings, unquoted object keys, Python-style booleans (True/False/None), markdown code fences wrapping the JSON, UTF-8 BOM characters, null bytes, unclosed brackets from truncated streaming output, and JavaScript-style comments. Malformed JSON is extremely common in output from AI language models, in webhook payloads from older services, and in hand-written configuration files. The AI JSONMedic Fixer identifies and repairs all of these patterns and explains each repair in plain English.
Trailing Comma
A comma placed after the last element of a JSON array or the last property of a JSON object: [1, 2, 3,] or {"a": 1,}. Trailing commas are the #1 most common JSON syntax error. They are valid in JavaScript (ES2017+), Python dicts, and JSON5, but strictly forbidden in JSON by RFC 8259. Any strict JSON parser will throw a SyntaxError. AI language models generate trailing commas constantly — particularly at the end of AI-generated arrays where the model adds a comma before generating the closing bracket. The AI JSONMedic Fixer removes all trailing commas as part of its standard repair pipeline.
Got malformed JSON?
Paste it into AI JSONMedic and get it fixed in under a second — with a plain-English explanation of every repair made.