MalformedJSONException: Resolving JSON Parsing Errors

An invalid .json configuration file can cause your server to crash or plugins/mods to not load. You should never edit a .json file directly, as they have a very specific format and one minor error will cause the entire file to become invalid.

Solution

The most common files that cause this issue are the default .json files found in the root directory (default / base directory) on your server files. These files handle your whitelist, player bans and server operators (admins). We recommend deleting these files to solve the issue, but do be aware that this will reset your whitelist, banned players and ops. You can reconfigure these files by running commands in the console (never edit .json files directly).

Files to delete:

  • ops.json
  • whitelist.json
  • banned-players.json
  • banned-ips.json
  • whitelist.json

Example Error

com.google.gson.JsonParseException: com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 1 path $
	at ra.a(SourceFile:506)
	at ra.a(SourceFile:522)
	at pn.g(SourceFile:141)
	at nw.A(SourceFile:99)
	at nw.(SourceFile:25)
	at nx.j(SourceFile:188)
	at net.minecraft.server.MinecraftServer.run(SourceFile:434)
	at java.lang.Thread.run(Thread.java:748)
Caused by: com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 1 path $
	at com.google.gson.stream.JsonReader.syntaxError(JsonReader.java:1559)
	at com.google.gson.stream.JsonReader.checkLenient(JsonReader.java:1401)
	at com.google.gson.stream.JsonReader.doPeek(JsonReader.java:593)
	at com.google.gson.stream.JsonReader.peek(JsonReader.java:425)
	at com.google.gson.internal.bind.CollectionTypeAdapterFactory$Adapter.read(CollectionTypeAdapterFactory.java:74)
	at com.google.gson.internal.bind.CollectionTypeAdapterFactory$Adapter.read(CollectionTypeAdapterFactory.java:61)
	at ra.a(SourceFile:504)
	... 7 more
If you require any further assistance, please contact our support at: https://shockbyte.com/billing/submitticket.php

Mitchell Smith

Managing Director @ Shockbyte

  • json, gson, vanilla, minecraft, edit, ftp, crash
  • 22 Users Found This Useful
Was this answer helpful?

Related Articles

How to Analyze a Timings v2 Report

Pre-requisites: You can create a timings report by following our guide. Once you have the...

Set PluginClassLoader as parallel capable

If you're receiving the error "Set PluginClassLoader as parallel capable" and your server isn't...

Unable to Place Command Blocks

Sometimes, Minecraft servers don't generate their files properly when you start your server for...

Understanding Java Error Exit Codes

In some cases, your server may crash without any explanation or crash report. Often in these...

Connection refused: no further information

Note: This tutorial applies to Windows users only. The...