XML & JSON guides

Short, practical deep-dives written from the errors we see every day in theformatter and validators. No fluff — each guide is the page we wish existed the first time we hit the problem.

Reference · Index

XML & JSON error messages explained

Look up the exact parser error you were given — from “Unexpected token <” to “Content is not allowed in prolog” — and find out what it really means.

JSON · Errors

“Unexpected token < in JSON at position 0”

The most-searched JSON error, and it almost never means your JSON is broken. It means you got HTML — here is how to find out which HTML, and why.

JSON · Python

Python JSONDecodeError, decoded

Expecting value, Extra data, Expecting property name, Invalid control character — every message the json module raises, plus the UTF-8 BOM trap.

XML · Errors

“Content is not allowed in prolog”

An invisible byte-order mark, a stray blank line, or an HTML error page. Five causes, how to detect each one, and the fix in Java, .NET, PHP and Python.

XML · Errors

Two consecutive hyphens in an XML comment

Why “--” is illegal anywhere inside a comment, why commenting out a block that contains a comment breaks, and the fixes that actually work.

JSON · Errors

How to fix “Invalid JSON”: the 10 most common errors

Trailing commas, single quotes, unquoted keys, unclosed brackets, invisible characters — what each error looks like and how to fix it.

XML · Errors

Common XML errors and how to fix them

The eight reasons a document is “not well-formed”: mismatched tags, bare ampersands, duplicate attributes, multiple roots, and more.

JSON · Reference

JSON syntax rules: the complete guide

The six data types, every string escape, exact number rules, the duplicate-key trap, and how JSONC, JSON5, and NDJSON differ from strict JSON.

XML · Reference

XML special characters: escaping, entities & CDATA

Which characters must be escaped and where, the five predefined entities, numeric references, and when to reach for a CDATA section.

Concepts

JSON vs XML: differences and when to use each

Data model, schemas, comments, size, and tooling compared side by side — plus the misconceptions about both formats.

Conversion

Converting between JSON and XML: what breaks

Attributes, the single-item array bug, type guessing, and mixed content — how converters bridge the two formats and where data gets lost.

Why these guides exist

Indentio’s tools tell you the exact line and column where a document breaks. These guides cover the other half of the job: understanding why it broke and how to stop it happening again. They’re updated as the tools evolve and as new failure patterns show up.

Missing a topic you’d find useful? Tell us — reader requests decide what we write next.