Only show guides for your app
When your app crashes parsing its own config or data file, the error tells you exactly where — learn to read the line/column pointer, and fix the handful of JSON and YAML mistakes that cause it.
Sometimes the crash isn't your code — it's a file your code reads. A config.json, a data file, a plugin's YAML config: one stray comma or a rogue tab, and the parser refuses the whole file. The good news is these errors are the most precise you'll ever get. They point at the exact spot. This guide teaches you to read that pointer and fix what it's pointing at.
| At a glance | |
|---|---|
| Symptom | Crash while loading a .json / .yml config or data file |
| The gift | The error names the line and column of the mistake |
| Fix | Go to that spot, correct the syntax, restart |
A trailing comma — a comma after the last item — is the classic JSON mistake. Here's a config.json with one, parsed two ways.
Node (JSON.parse) prints the offending line and puts a caret under it:
"owners": ["123",]
^
SyntaxError: Unexpected token ']', ..."": ["123",]... is not valid JSON
Python (json.load) gives you coordinates — line, column, and character offset:
json.decoder.JSONDecodeError: Expecting value: line 4 column 20 (char 57)
line 4 column 20 is not a hint — it's an address. Open the file, go to line 4, look at column 20, and the problem is right there. Read the pointer first, every time, before re-reading the whole file.
| Mistake | Looks like |
|---|---|
| Trailing comma | ["a", "b",] or {"x": 1,} |
| Missing comma | {"a": 1 "b": 2} |
| Single quotes | {'name': 'bot'} — JSON requires double quotes |
| Unquoted key | {name: "bot"} — keys must be quoted |
| Comments | // like this — JSON has none; delete them |
| Trailing/missing bracket | one too many or too few } / ] |
YAML is what most Minecraft plugins use for their configs, and its rules are about indentation. Two mistakes dominate.
Tabs. YAML forbids tabs for indentation — spaces only. A single tab produces:
yaml.scanner.ScannerError: while scanning for the next token
found character '\t' that cannot start any token
in "config.yml", line 3, column 1
Inconsistent indentation. Lines that should line up but don't:
yaml.parser.ParserError: while parsing a block mapping
expected <block end>, but found '<block mapping start>'
in "config.yml", line 3, column 2
Again — the line 3, column 1 at the bottom is the exact spot. YAML errors read a little more verbosely than JSON, but the last two lines are always "which file, which line and column."
| Mistake | Fix |
|---|---|
| A tab anywhere in indentation | Replace every tab with spaces |
| Uneven indentation | Items at the same level need the same number of spaces |
| No space after a colon | key:value → key: value |
| An unquoted special value | Wrap values with :, #, % or leading symbols in quotes |
💡 Tip: For Minecraft plugin configs specifically — which are all YAML — the same rules apply: spaces not tabs, consistent indentation, a space after every colon. The plugin loads its config the moment the server starts, so a broken
.ymlshows up right in the console. See Editing plugin configs safely.