Tag
Syntax Checking
Finding the exact line where a file stops being valid. Common errors in JSON, YAML, XML, TOML, INI, env and CSV files, and how to fix each.
11 posts
Text File Encodings Explained: UTF-8, UTF-16, ANSI and the BOM
Why text files show strange characters: how UTF-8, UTF-16 and Windows code pages differ, what a byte order mark does and how to fix encoding problems.
.env File Syntax: Quotes, Comments, Spaces and Multiline Values
The rules for writing .env files: KEY=value format, quoting, comments, spaces, variable expansion and the differences between dotenv implementations.
INI File Syntax: Sections, Keys, Values and Comments
A practical guide to INI syntax: section headers, key=value pairs, comments, quoting, duplicates and the dialect differences that cause settings to be ignored.
TOML Syntax Guide: Tables, Arrays, Inline Tables and Dates
A practical TOML syntax reference covering keys, strings, tables, arrays of tables, inline tables, dates and the errors that make a file invalid.
XML Special Characters, Entities and CDATA Sections Explained
How to include &, <, > and quotes in XML safely using entity references, character references and CDATA, and the errors that result when you do not.
XML Well-Formed vs Valid: What Is the Difference?
Well-formed XML follows the syntax rules; valid XML also conforms to a schema. Learn the rules, the common errors and how DTD, XSD and RELAX NG fit in.
How to Fix YAML Indentation Errors and "Mapping Values" Messages
Decode YAML errors such as "mapping values are not allowed here" and "did not find expected key". Fix tabs, misaligned lists, missing spaces and bad nesting.
How to Validate a CSV File Before You Import It
Catch ragged rows, unclosed quotes, wrong delimiters and encoding problems before an import fails. A step-by-step CSV validation checklist.
CSV Quoting and Escaping Rules: Commas, Quotes and Line Breaks
How CSV handles commas, double quotes and line breaks inside values, based on RFC 4180, plus the common mistakes that split rows in the wrong place.
How to Fix Invalid JSON: The 8 Most Common Errors
Fix "Unexpected token" and parse errors. The eight causes of invalid JSON, from trailing commas and single quotes to comments and unescaped characters.
10 Common Markdown Mistakes and How to Fix Them
The ten Markdown errors that cause broken lists, missing line breaks, vanished tables and mangled links, with a quick fix for each.