Lax Syntax
JSON relies on a strict syntax, and parsers typically fail at the first syntax error. Some parsers, especially in HTML contexts, adopt a more lenient approach with preference to capturing as much data as possible. In most cases, we will try to recover from common syntax errors, but annotate them with warnings to promote resolution and broad client-compatibility.
Examples
The source contained invalid syntax that we ignored (block comment) which may not be supported by other systems.
The source contained invalid syntax that we ignored (line comment) which may not be supported by other systems.
The source contained invalid syntax that we ignored (invalid literal; e.g. "TRUE" -> "true") which may not be supported by other systems.
The source contained invalid syntax that we ignored (leading zero) which may not be supported by other systems.
The source contained invalid syntax that we ignored (invalid escape; e.g. "\\ " -> "\\ ") which may not be supported by other systems.
The source contained invalid syntax that we ignored (missing escape; e.g. "\n" -> "\\n") which may not be supported by other systems.
The source contained invalid syntax that we ignored (invalid Unicode; e.g. "\\uD800" -> "\\uFFFD") which may not be supported by other systems.
The source contained invalid syntax that we ignored (extra comma) which may not be supported by other systems.
The source contained an object with a duplicate key, so some data was ignored.