Skip to content

Blog

Guides, tutorials, and deep dives on JSON - from the basics to advanced topics like schema validation and security. 145 articles, newest first.

Start here

How-To

5 Python CSV DictReader Tests Before a JSON Import

Test CSV header uniqueness, row width, multiline records, byte order marks, and field conversion before creating JSON.

9 min read
JavaScript

6 Node.js Fetch Gzip JSON Tests for HTTP Proxies

Test the bytes and headers a Node.js proxy sends when Fetch receives compressed JSON from an upstream server.

10 min read
How-To

4 Python json.tool Checks for CI Pipelines

Test exit status, decoder policy, JSON Lines output, and staged publication when using Python json.tool in CI.

9 min read
How-To

5 SQLite json_group_array Tests for Nested JSON

Test SQLite JSON aggregation for quoted objects, CTE boundaries, stable order, missing children, and multiple child collections.

9 min read
JavaScript

4 Node.js JSON Import Tests for Configuration Files

Test the Node.js JSON import attribute, the default export, shared module state, and the difference between a cached import and a fresh file read.

9 min read
JavaScript

5 Node.js Worker ArrayBuffer Transfer Tests

Use five runnable Node.js tests to distinguish JSON messages, cloned bytes, detached views, pooled buffers, and safe transfer of a byte slice.

9 min read
How-To

6 Tests for Parsing Concatenated JSON Objects in Python

Use Python raw_decode to read a bounded batch of adjacent JSON objects, with tests for whitespace, ambiguous scalars, corrupt suffixes, offsets, and batch limits.

10 min read
Advanced

6 Go JSON Decoder Tests for API Request Bodies

Test Go encoding/json request decoding for trailing values, unknown fields, key collisions, number precision, nulls, and partially populated destinations.

10 min read
Advanced

4 jq Streaming Checks for Large JSON Files

Test jq streaming event shapes, path selection, bounded summaries, and parse failures before processing a large JSON document.

9 min read
Advanced

5 Python Requests JSON Response Tests Before Release

Test HTTP status, empty bodies, response media types, decoded shapes, and decoder options with local Python Requests response fixtures.

10 min read
Advanced

4 JSON Schema Array Length Tests Before API Release

Test array-length boundaries, element quality, optional properties, and nested counts with executable Draft 2020-12 Python fixtures.

9 min read
Advanced

5 Sparse Array JSON Tests Before JavaScript Release

Test JavaScript array holes, skipped validation, delete versus splice, dropped metadata, and explicit indexed JSON representations.

10 min read
Advanced

6 JSON.stringify Getter Tests Before API Release

Test getter reads, replacer timing, thrown errors, traversal mutation, inherited serialization hooks, and explicit output projection.

10 min read
Advanced

5 JSON Schema Dependency Tests Before API Release

Test property presence, dependency chains, whole-object subschemas, nested scope, and dialect migration with executable Python fixtures.

10 min read
Advanced

4 Python JSON Encoding Policy Tests Before API Release

Test non-finite numbers, dictionary key loss, custom conversion contracts, and partial output before sending Python-generated JSON.

9 min read
JSON Schema

6 JSON Schema Property Count Tests Before API Release

Test minProperties and maxProperties boundaries, present values, required fields, nested scope, name restrictions, and parsed duplicate names.

10 min read
JavaScript

5 Response.json Construction Tests Before API Release

Test static Response.json output, synchronous serialization failures, serialization hooks, status restrictions, and explicit response headers.

10 min read
How-To

5 JSON Patch Array Update Tests Before API Release

Test JSON Patch array insertion, shifting indices, move ordering, copy isolation, and guarded candidate updates with executable Python fixtures.

10 min read
JSON Schema

6 JSON Schema oneOf Branch Tests Before API Release

Test oneOf branch cardinality, required tags, numeric overlap, shared constraints, intentional anyOf overlap, and variant additions with executable fixtures.

10 min read
JavaScript

4 localStorage JSON State Tests Before Frontend Release

Test stored JSON classification, preference migrations, storage access failures, and initialization that preserves unsupported browser state.

11 min read
JavaScript

6 JSON.rawJSON Serialization Tests Before Release

Test raw JSON primitives, exact numeric tokens, wrapper identity, replacers, and receiver behavior before changing a JavaScript serializer.

9 min read
Python

5 Python JSON Decoding Policy Tests Before Release

Test Python JSON input policies for control characters, duplicate keys, non-finite numbers, document shape, UTF-8 decoding, and byte limits.

10 min read
JavaScript

5 Fetch JSON Response Body Tests Before Release

Test single reads, stream locks, cloning, parse failures, and null bodies with executable JavaScript assertions for Fetch JSON clients.

10 min read
Guides

4 JSON5 to JSON Checks Before API Release

Test JSON5-to-JSON conversion for grammar boundaries, non-finite numbers, duplicate members and the strict API's value contract.

9 min read
Guides

6 Pydantic JSON Validation Tests Before API Release

Test Pydantic JSON validation for strict input modes, extra fields, nullable requirements, defaults, aliases and serialized output.

9 min read
Guides

5 SQLite JSON Storage Tests Before API Release

Test SQLite JSON text storage for syntax constraints, null and missing paths, extracted types, structured updates and transaction read-back behavior.

10 min read
Guides

6 JSON Text Sequence Tests for Streaming APIs

Test application/json-seq framing, multiline records, UTF-8 chunk splits, incomplete scalars, recovery and consumer limits with Python fixtures.

10 min read
Guides

4 JSON URL Query Tests Before API Release

Test JSON query parameters for encoding layers, special characters, missing or repeated values, and application acceptance before side effects.

9 min read
Guides

5 Python Dataclass JSON Checks Before API Release

Test Python dataclass JSON boundaries for exposed fields, datetime and Enum representations, nested copies, input validation and round-trip behavior.

10 min read
Guides

4 JSON Schema not Tests for Forbidden API States

Test JSON Schema negation with explicit allowed types, required discriminators, forbidden field combinations and application acceptance gates.

9 min read
Guides

5 JSON Schema String Length Tests Before API Release

Test minLength and maxLength with missing fields, inclusive boundaries, emoji, normalization, and separate UTF-8 byte budgets.

9 min read
Guides

5 JSON Schema Content Keyword Tests Before API Release

Test contentEncoding, contentMediaType, and contentSchema across outer validation, bounded decoding, UTF-8 parsing, inner schemas, and application policy.

9 min read
Guides

6 JSON Schema Error Reporting Tests Before API Release

Test schema error adapters across parser failures, instance paths, missing properties, branch context, bounded results, and safe public diagnostics.

9 min read
Guides

4 JSON Schema Recursive Tree Tests Before API Release

Test recursive JSON trees across finite leaves, descendant validation, application depth and node budgets, and packaged schema execution.

9 min read
Guides

8 JSON Schema enum and const Tests Before Release

Test fixed JSON values across presence, types, numeric equality, object and array equality, string spelling, array items, and contract changes.

10 min read
Guides

6 JSON Schema Numeric Validation Tests Before API Release

Test numeric types, inclusive and exclusive limits, multipleOf, decimal arithmetic, display scale, and deployed parser behavior before API release.

9 min read
Guides

5 JSON Schema readOnly and writeOnly Tests Before Release

Test field direction across JSON Schema annotations, request schemas, response serialization, nested objects, and API enforcement.

9 min read
Guides

5 JSON Schema Default Value Tests Before API Release

Test missing fields, explicit values, invalid defaults, nested settings, and normalization order before applying JSON Schema defaults.

9 min read
Guides

6 JSON Schema Dynamic Key Tests Before API Release

Test dynamic JSON object keys with propertyNames, patternProperties, value schemas, reserved names, and realistic API fixtures.

9 min read
Guides

8 JSON Schema Tuple Validation Tests Before API Release

Test positional arrays with prefixItems, length boundaries, optional trailing values, null slots, composition, and schema-dialect migration.

10 min read
Guides

8 JSON Schema contains Tests Before API Release

Test array match counts, missing discriminator fields, mixed items, and evaluated positions before deploying a JSON Schema contract.

9 min read
Guides

5 JSON Schema uniqueItems Tests Before API Release

Test JSON Schema array uniqueness across scalar values, reordered objects, nested arrays, business IDs, and batch limits.

9 min read
Security

5 JSON-in-HTML Escaping Tests Before Shipping Frontend Data

Five executable tests for embedding JSON in HTML safely, covering script end tags, non-executable JSON blocks, data attributes, DOM text sinks, CSP, and rendered-page verification.

11 min read
Advanced

8 JSON Schema Format Validation Tests Before API Release

Run eight JSON Schema format validation tests for assertion mode, date-time, email, URI, UUID, network addresses, custom formats, and validator parity.

11 min read
Advanced

6 JSON Schema Object Closure Tests Before API Release

Test unknown-field rejection across JSON Schema composition, references, branches, nested objects, patterns, and production validation paths.

11 min read
Advanced

5 JSON API Redirect Tests Before Production

Test five JSON API redirect risks involving method changes, replayed bodies, credential forwarding, Location resolution, loops, and non-JSON destinations.

9 min read
Testing

9 JSON Binary Data Encoding Tests Before API Release

Nine executable tests for carrying binary data in JSON with Base64 or Base64url, covering alphabets, padding, UTF-8, size limits, metadata, integrity, strict decoding, and streaming boundaries.

12 min read
Advanced

6 JSON Schema Conditional Validation Tests Before API Release

Test six JSON Schema conditional-validation cases involving if/then/else, required discriminators, dependent properties, conditional subschemas, and array match counts.

9 min read
JavaScript

6 JSON Error Serialization Tests Before Production Logging

Test JavaScript Error serialization with executable examples covering hidden fields, custom metadata, thrown values, causes, AggregateError, cycles, redaction, and stable log contracts.

11 min read
JavaScript

8 JSON Key Order Tests Before Comparing API Responses

Test JSON key ordering with executable JavaScript covering semantic equality, insertion order, integer-like names, deletion, merging, replacer arrays, recursive sorting, snapshots, and canonicalization.

12 min read
JavaScript

5 JSON Map and Set Serialization Tests Before API Release

Test JavaScript Map and Set JSON serialization with executable examples covering silent loss, wire shapes, key collisions, tagged round trips, and strict decoding.

11 min read
APIs

9 JSON Date Tests Before Releasing an API

Run nine executable JSON date tests covering calendar dates, RFC 3339 offsets, equivalent instants, precision, epoch units, UTC output, invalid dates, and round trips.

12 min read
JavaScript

8 JSON.parse Reviver Tests Before Transforming Data

Test JSON.parse reviver behavior with executable JavaScript covering syntax failures, traversal order, deletion, root calls, source text, keys, and callback binding.

11 min read
JavaScript

6 JSON.stringify Replacer Tests Before Sending API Data

Test JSON.stringify replacer behavior with executable JavaScript covering root calls, toJSON, omitted values, property lists, BigInt, and circular references.

11 min read
Advanced

5 JSON Array Comparison Tests Before API Releases

Test JSON array comparisons for order, duplicate counts, stable record identity, nested-array policy, and type preservation before trusting an API regression diff.

10 min read
Advanced

4 JSON Pointer Tests Before Updating API Data

Test JSON Pointer boundaries with executable JavaScript: root and empty keys, escape layers, array indexes, and missing targets before API updates.

10 min read
Advanced

6 JSON Unicode Tests Before Comparing API Strings

Test JSON string equality across escape spelling, canonical and compatibility normalization, key collisions, length units, and malformed surrogate sequences.

10 min read
Advanced

4 JSON Repair Checks Before Accepting Recovered Data

Test repaired JSON for source selection, completeness, application invariants, and review evidence before allowing recovered values into trusted workflows.

10 min read
Advanced

5 JSON-to-XML Checks Before Sending API Data

Test JSON-to-XML output against receiver requirements, name collisions, collection boundaries, null semantics, and escaped text before integrating an XML API.

10 min read
Advanced

6 JSON-to-YAML Checks Before Deploying Configs

Test emitted YAML for scalar types, mapping keys, exact multiline text, collection shape, reproducible output, and application-level configuration requirements.

10 min read
Advanced

4 JSONPath Migration Checks Before Release

Test JSONPath engine migrations with executable fixtures covering filter semantics, selected locations, result cardinality, ordering, and duplicate matches.

9 min read
Advanced

6 XML-to-JSON Tests Before Trusting API Data

Test XML-to-JSON mappings for malformed input, list shape, attributes, namespaces, mixed content, and scalar fidelity with executable JavaScript assertions.

10 min read
Advanced

5 YAML-to-JSON Tests Before Converting Configs

Test YAML-to-JSON conversion across scalar resolution, mapping keys, document streams, aliases, and JSON serialization before using the result as configuration.

10 min read
Advanced

4 JSON Schema Reference Checks Before Release

Test JSON Schema references across base URIs, fragment targets, closed resource registries, and generated or recursively packaged schemas.

10 min read
Advanced

5 JSON Schema Regex Checks Before Deployment

Test JSON Schema patterns across JSON escaping, match boundaries, Unicode length, regex-engine compatibility, and bounded execution.

9 min read
Advanced

6 JSON-to-CSV Safety Tests Before Sharing Exports

Test JSON-to-CSV exports across untrusted cells, CSV structure, formula handling, spreadsheet imports, save/reopen behavior, and downstream data fidelity.

10 min read
APIs

5 JSON API Concurrency Tests for Safer Updates

Test conditional JSON updates across validator scope, atomic persistence, alternate writers, recreated resources, and conflict recovery.

10 min read
JavaScript

6 JSON File Write Checks to Prevent Lost Updates

Test JSON file persistence across serialization, temporary files, atomic replacement, concurrent updates, durability, and recovery with executable Node.js examples.

10 min read
APIs

4 Microsoft Graph JSON Batch Tests Before Release

Test Microsoft Graph JSON batching across response correlation, per-operation outcomes, retry reconstruction, and bounded pagination work.

10 min read
Guides

6 JSON API Compression Checks Before Enabling Gzip

Test JSON API compression across headers, negotiated cache variants, client decoding, upload limits, resource costs, and streaming delivery.

11 min read
JavaScript

4 JSON Import Attribute Checks Before Deployment

Debug JSON module imports across syntax, default exports, production delivery, and cached data with four practical deployment checks.

10 min read
Security

5 JSON Prototype Pollution Checks Before Merging API Data

Test the boundary between parsed JSON and JavaScript objects: assignment, accepted fields, dictionaries, inherited reads, and downstream dependency behavior.

10 min read
APIs

7 JSON API Timeout Mistakes That Cause Slow Failures and Retry Storms

Fix seven JSON API timeout mistakes involving missing deadlines, guessed values, response bodies, retries, deadline propagation, cancellation, and observability.

10 min read
APIs

8 JSON Merge Patch Tests Before Shipping an API

Test a JSON Merge Patch endpoint across client serialization, deletion, collection replacement, root types, nested updates, authorization, validation, and concurrent writes.

10 min read
APIs

6 JSON Webhook Mistakes That Lose or Duplicate Events

Build safer JSON webhook receivers with raw-body verification, durable acceptance, atomic deduplication, order-independent processing, contract checks, and recovery tests.

11 min read
APIs

7 JSON API Caching Mistakes That Serve Stale or Private Data

Prevent seven JSON API caching failures involving private data, Cache-Control, Vary, ETags, invalidation, errors, and cache keys.

9 min read
APIs

7 JSON API CORS Mistakes That Block Browser Requests

Diagnose seven JSON API CORS mistakes involving origins, credentials, preflight OPTIONS requests, allowed headers, error responses, exposed headers, and browser testing.

10 min read
APIs

7 JSON API Rate Limit Mistakes That Trigger More 429 Errors

Fix seven JSON API rate-limit mistakes involving 429 detection, Retry-After parsing, backoff, concurrency, pagination, retry budgets, and observability.

8 min read
APIs

7 JSON API Idempotency Mistakes That Create Duplicate Orders

Prevent seven JSON API idempotency failures involving retry keys, payload matching, concurrency, side effects, stored results, expiration, and downstream work.

9 min read
APIs

8 JSON API Pagination Mistakes That Cause Missing or Duplicate Data

Fix eight JSON API pagination mistakes involving unstable order, offsets, cursors, navigation links, limits, termination, filters, and concurrent writes.

10 min read
APIs

7 JSON API Versioning Mistakes That Break Client Integrations

Avoid seven JSON API versioning mistakes involving breaking changes, defaults, deprecation, schemas, SDKs, consumer tests, and retirement.

9 min read
Guides

7 JSON Canonicalization Checks for Reliable Hashes

Understand why equivalent JSON can produce different hashes, distinguish raw-body webhook verification from canonical signing, and test seven practical checks.

10 min read
Guides

7 JSON Config File Mistakes That Break Production Deployments

Prevent seven JSON configuration failures involving parsers, secrets, environment copies, weak types, merge rules, unsafe defaults, and rollouts.

10 min read
Advanced

8 JSON Schema Validation Mistakes That Let Bad API Data Pass

Fix eight JSON Schema mistakes involving required fields, unknown properties, formats, oneOf branches, defaults, composition, dialects, and tests.

11 min read
How-To

Streaming JSON from AI APIs: How to Parse Partial Responses Safely

Build a reliable streaming JSON workflow for AI responses, with JavaScript examples, completion checks, validation, and practical debugging steps.

12 min read
Advanced

Structured Logging With JSON: Why Your Logs Should Be Machine-Readable

Structured logging in JSON: standard fields (timestamp, level, message, service, trace_id), setup for pino, structlog, zerolog, zap, and Logback, querying with jq and log platforms, and the pitfalls.

9 min read
Debugging

JSON Escape Characters: How to Escape Quotes, Backslashes, and Unicode

The complete list of JSON escape sequences with examples. Learn how to escape double quotes, backslashes, newlines, and Unicode in JSON strings, fix 'Bad escaped character' errors, and avoid double-escaping.

9 min read
JavaScript

package.json Explained: Every Field That Actually Matters

A field-by-field guide to package.json: name, version, scripts and pre/post hooks, dependency types, semver ranges, engines, type: module, main/exports/types, files, private, and workspaces.

9 min read
Advanced

JSON Schema vs OpenAPI Schema: What Is the Difference?

Both describe data structures, but your OpenAPI version determines which JSON Schema features you can use.

5 min read
Advanced

Storing JSON in PostgreSQL and MySQL: JSONB, Indexes, and Query Syntax

How to store and query JSON in PostgreSQL (json vs jsonb, -> ->> @> operators, GIN indexes, jsonb_set) and MySQL (JSON type, JSON_EXTRACT, generated columns, JSON_TABLE), and when not to.

10 min read
How-To

How to Compare Two JSON Files: 5 Methods That Catch Real Differences

Compare two JSON files without false positives from key order or whitespace. Covers sort-and-diff in the browser, VS Code, jq, Python DeepDiff, and the json-diff CLI, with commands you can copy.

9 min read
Security

How to Remove Sensitive Data From JSON Before Sharing an API Response

Sharing an API payload can speed up debugging. Sharing a production token can create a completely different problem.

4 min read
Comparison

JSON vs Protocol Buffers: Size, Speed, and When Binary Is Worth It

JSON vs Protobuf compared: text vs binary encoding, schema-less vs .proto contracts, field-number compatibility, gRPC and grpc-web, debugging cost, MessagePack and CBOR as middle ground, and a decision table.

9 min read
Comparison

JSON vs CSV: Which Format Should You Use for Your Data?

JSON vs CSV compared on structure, data types, file size, tooling, streaming, and schema support, with a comparison table and decision rules for analytics exports, APIs, logs, and config files.

8 min read
Advanced

How to Convert JSON to TypeScript Types (and Avoid False Confidence)

Copying a JSON response into TypeScript is easy. Giving it the correct types takes a little more thought.

5 min read
Fundamentals

How to Open a JSON File on Windows, Mac, Android, and iPhone

A .json file is plain text. Learn how to open and read a JSON file on any device with built-in apps, a browser, VS Code, or a free online viewer, and how to make a one-line file readable.

7 min read
Advanced

JSONPath vs JSON Pointer: Querying JSON Without Writing Loops

JSON Pointer (RFC 6901) addresses one exact location; JSONPath (RFC 9535) queries many with wildcards, recursion, and filters. Syntax, escaping rules, side-by-side examples, and where each one is used.

8 min read
PHP

Laravel JSON API Responses: Return the Right Data and Handle Errors Cleanly

Sending JSON from Laravel is easy. Sending predictable responses your frontend can trust takes a few extra decisions.

5 min read
APIs

JSON Patch vs JSON Merge Patch: Partial Updates Done Right

Two standard body formats for HTTP PATCH: JSON Merge Patch (RFC 7396) sends a diff where null deletes, and JSON Patch (RFC 6902) sends an atomic list of add, remove, replace, move, copy, and test operations with JSON Pointer paths. When to use each, with examples and libraries.

8 min read
APIs

JSON Error Response Format: RFC 9457 Problem Details and Practical Alternatives

How to design JSON error responses that clients can actually handle: the RFC 9457 Problem Details format with application/problem+json, field-level validation errors, stable error codes, localization, and implementation examples in Express and FastAPI.

8 min read
Fundamentals

JSON vs JavaScript Object: They Look Similar, but They're Not the Same

Curly braces can hide a big difference: one is a text format, the other is a value in your JavaScript program.

4 min read
How-To

Can You Add Comments in JSON? 5 Workarounds That Work

JSON does not support comments, and // or /* */ will break your file. Here are 5 practical workarounds, including JSONC, JSON5, and comment keys, plus where comments are already allowed.

8 min read
Security

How to Decode a JWT: Reading the JSON Inside a JSON Web Token

A JWT is three base64url-encoded segments, and the first two are JSON. Learn how to decode the header and payload in JavaScript, Node.js, Python, and jq, read the standard claims like exp and iss, and why decoding is not the same as verifying.

8 min read
Tools

How to Format JSON in Chrome DevTools When an API Response Looks Messy

A REST API returned a wall of JSON? Your browser already has a few useful ways to inspect it.

4 min read
APIs

JSON-LD for SEO: How to Add Structured Data to Your Website

A practical guide to JSON-LD structured data: what @context and @type mean, why Google recommends JSON-LD over microdata, copy-paste examples for Organization, Article, FAQPage, BreadcrumbList, and Product, where to put the script tag, and how to validate it.

9 min read
Debugging

How to Fix Invalid JSON Generated by AI (Without Breaking the Data)

AI-generated JSON can look correct and still fail in your code. Learn to identify the actual problem before editing it.

5 min read
APIs

application/json: The Correct JSON Content-Type and Why text/json Is Wrong

The correct Content-Type for JSON is application/json, as registered in RFC 8259. Learn why the charset parameter is optional, what the +json variants mean, how to set the header in Express, Flask, Django, Spring, Next.js, and nginx, and how to debug 415 errors.

6 min read
Fundamentals

JSON Date Format: How to Store, Parse, and Validate Dates

JSON has no date type. Learn the right JSON date format (ISO 8601), how to parse dates in JavaScript and Python, handle timezones, generate random dates for test data, and validate them with JSON Schema.

10 min read
Performance

Is There a JSON File Size Limit? Browser, Node, Python, and API Limits

The JSON spec sets no size limit, but V8 string caps, Node memory, Express and Nginx body limits, API Gateway and Lambda payload caps, and MongoDB document limits do. Learn where each limit lives, the error it produces, and how to work around it with pagination, JSON Lines, streaming parsers, and compression.

7 min read
PHP

PHP json_encode vs json_decode: Examples, Errors, and the Difference

Two functions, opposite directions. Here's how to use them without losing an afternoon to malformed JSON.

5 min read
Debugging

JSON Encoding Errors: UTF-8, BOM, and the Invisible Character That Breaks Parsing

Why JSON must be UTF-8 without a byte order mark, what 'Unexpected token \ufeff' and mojibake like é mean, where the BOM comes from (Notepad, PowerShell, Excel), and how to detect and strip it in Node, Python, VS Code, and the shell.

7 min read
Fundamentals

Duplicate Keys in JSON: What the Spec Says and What Parsers Actually Do

RFC 8259 says JSON object names SHOULD be unique, so duplicate keys are technically valid but unpredictable. See how JavaScript, Python, Go, Jackson, serde, and PostgreSQL handle them, why it is a security problem, and how to detect duplicates.

6 min read
How-To

How to Flatten Nested JSON (and Unflatten It Back)

Flatten nested JSON into dot-notation keys like user.address.city with recursive functions in Python and JavaScript, pandas json_normalize, the flat npm package, and jq. Includes unflattening and the dotted-key collision gotcha.

8 min read
Tools

10 Browser JSON Formatters for Large API Responses

Compare the best browser-based JSON formatters for handling large API responses. Features, performance, and privacy compared side by side.

10 min read
Debugging

JSON Parse Error: Causes and How to Fix It Fast

Getting SyntaxError: Unexpected token in JSON? This guide covers the top 5 causes of JSON parse errors with step-by-step fixes and code examples.

9 min read
How-To

How to Validate Large API JSON in Your Browser

Learn how to validate large JSON files and API responses directly in your browser without uploading data to any server. Step-by-step guide.

8 min read
How-To

JSON Pretty Print: Online, CLI, Python & JavaScript

Learn how to JSON pretty print online, from the command line, and in Python or JavaScript. Copy-paste examples for every method.

8 min read
How-To

How to Validate JSON in VS Code: Complete 2026 Guide

Learn how to validate JSON in VS Code using built-in features, JSON Schema, and extensions. Plus when to use an online JSON validator instead.

8 min read
Fundamentals

JSON Array vs Object: When to Use Each (Examples)

Understand the difference between JSON arrays and objects, when to use each, and how to avoid common mistakes with real-world examples.

8 min read
Debugging

Fix Trailing Comma in JSON: Quick Guide

Learn how to fix trailing comma errors in JSON. Why JSON bans them, how to spot them in large files, and how to prevent them.

7 min read
APIs

JSON Key Naming Conventions: camelCase vs snake_case for APIs

Which JSON key naming convention should your API use? What Google, GitHub, Stripe, and AWS actually do, the rules that matter more than the case style, and how to convert between camelCase and snake_case in Jackson, serde, Python, and JavaScript.

7 min read
Fundamentals

null vs Missing vs Empty String in JSON: Which One Should Your API Send?

JSON has three ways to say nothing: null, an absent key, and an empty string. They mean different things to clients, PATCH handlers, and databases. A practical guide with language mappings, PATCH semantics, JSON Schema patterns, and a recommendation table.

7 min read
Security

JSON Security Best Practices for Developers

Protect your applications from JSON injection, prototype pollution, unsafe deserialization, and data leaks. Practical security patterns for developers.

8 min read
Fundamentals

JSON Numbers: Why 9007199254740993 Becomes 9007199254740992

JSON has no size limit on numbers, but JavaScript parses them into 64-bit doubles. Learn why large IDs lose digits, how to fix it with string IDs, BigInt, and json-bigint, and how floats and money should be represented.

8 min read
Performance

How to Minify JSON for Smaller Files and Faster APIs

Learn how to minify JSON to reduce file size and boost API performance. Covers online tools, CLI methods, JavaScript techniques, and compression tips.

6 min read
JavaScript

JSON.parse(JSON.stringify()) for Deep Clone: When It Works and When It Lies

JSON.parse(JSON.stringify(obj)) is the most common deep clone in JavaScript, and it silently corrupts Dates, undefined, NaN, Maps, Sets, and class instances. See exactly what it loses and when to use structuredClone or lodash instead.

7 min read
JavaScript

Fix 'Converting Circular Structure to JSON' in JavaScript

Why JSON.stringify throws 'Converting circular structure to JSON', which objects cause it (Express req, Axios errors, React fibers, Mongoose docs), and five fixes ranked from best to last resort.

7 min read
Comparison

JSON vs YAML: Best Format for Config Files?

Compare JSON and YAML for config files. Side-by-side syntax, comments, multiline strings, anchors, pitfalls, and when to use each.

8 min read
Debugging

Unexpected End of JSON Input: 6 Causes and Fixes

'Unexpected end of JSON input' means the parser ran out of text before the JSON was complete. The six causes: empty response bodies, truncated downloads, response.json() on a 204, empty localStorage values, streaming chunks parsed early, and a missing closing brace. Diagnosis steps and guard code.

7 min read
Debugging

Unexpected Token in JSON at Position 0: What It Means and How to Fix It

Decode 'Unexpected token in JSON at position 0' by its first character: < means HTML came back, u means undefined was parsed, o means [object Object], \ufeff means a BOM, and ' means single quotes. How to confirm each cause and fix it.

8 min read
APIs

JSON in REST APIs: Structure and Security

Learn to use JSON in REST APIs. Covers response structure, headers, pagination, error formats, versioning, and security.

8 min read
JavaScript

Fetch JSON in JavaScript: response.json(), Errors, and Async Patterns

How to fetch JSON in JavaScript the right way: why fetch does not reject on 404, why response.json() throws on HTML error pages, checking Content-Type, POSTing a JSON body, timeouts with AbortController, retries, TypeScript typing, and parallel requests.

8 min read
JavaScript

JSON.parse() and JSON.stringify() Guide for 2026

Master JSON.parse() and JSON.stringify() in JavaScript. Covers revivers, replacers, error handling, deep cloning, and performance.

9 min read
JavaScript

How to Read and Write JSON Files in Node.js (fs, require, and import)

Four ways to read a JSON file in Node.js (require, ES module import, fs.readFileSync, fs/promises) and how to write one safely. Covers the require cache trap, atomic writes, __dirname vs import.meta.url, large files, and ENOENT and SyntaxError handling.

8 min read
Advanced

JSON Schema Explained: Validate Your API Data

A practical guide to JSON Schema covering type definitions, constraints, enums, nested objects, $ref references, and validation with ajv.

11 min read
Python

Python json Module: load, loads, dump, and dumps Explained

A practical guide to Python's built-in json module. Understand load vs loads and dump vs dumps, read and write JSON files, control indent and sort_keys, serialize datetime and Decimal with default=, and handle JSONDecodeError.

10 min read
APIs

How to Send JSON With curl: POST, PUT, Headers, and Files

The canonical curl command for posting JSON, plus reading the body from a file, PUT and PATCH, auth headers, Windows cmd and PowerShell quoting, pretty-printing the response, and fixing the 400 and 415 errors that come from a missing Content-Type.

8 min read
Debugging

10 JSON Syntax Errors That Waste Time and How to Fix Them

A practical guide to the ten most common JSON syntax errors developers encounter, with code examples showing the wrong and right way to write each pattern.

10 min read
Tools

jq Cheat Sheet: 40 Commands for Filtering and Transforming JSON

A reference-style jq cheat sheet: 40 filters and flags grouped by task, each with input and output. Covers selecting, filtering with select and map, raw and CSV output, to_entries, group_by, sort_by, string functions, conditionals, --arg, slurp, and piping from curl.

10 min read
Comparison

JSON vs XML: Which One Should You Use in 2026?

A practical comparison of JSON and XML covering syntax, file size, parsing performance, and when each format is the right choice for modern development.

10 min read
Fundamentals

JSON Lines (NDJSON) Explained: When One Object Per Line Beats an Array

JSON Lines (also called NDJSON) stores one JSON value per line with no outer array. Learn the exact format rules, why it wins for logs, streaming, and ML datasets, how to read and write it in Python, Node, and jq, and why formatters reject .jsonl files.

8 min read
How-To

How to Convert CSV to JSON (Without Breaking Your Numbers)

Convert CSV to JSON in Python, pandas, Node.js, the browser, and jq without losing leading zeros, turning 1e5 into a float, or mistaking the word null for a missing value. Covers type inference, array vs keyed output, and validation.

8 min read
How-To

How to Format JSON: 5 Methods That Work

Learn how to format and pretty-print JSON using online tools, jq, Python, VS Code, and JavaScript. Five practical methods with examples.

9 min read
How-To

How to Convert JSON to CSV: Python, JavaScript, Excel, and Online

Four ways to convert JSON to CSV: Python pandas json_normalize, Node.js with and without libraries, Excel Power Query, and jq @csv. Covers flattening nested objects, arrays in cells, quoting commas, and the UTF-8 BOM Excel needs.

9 min read
Fundamentals

What Is JSON? A Beginner's Guide You Actually Need

Learn what JSON is, how its syntax works, where it's used in development, and why it became the most popular data format on the web.

8 min read