MalformedJSONException: Resolving JSON Parsing Errors

An invalid .json configuration file might cause your server to crash. It is best not to make direct changes to a .json file since they follow a tight format and even a minor error might render the entire file invalid. In this article we will show you how to fix an invalid .json file error if you ever encountered one!

Example of the 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

How to fix it?

Default .json files in the server’s main directory often cause this issue, files suchs as (whitelist.json, banned-ips.json, banned-players.json, ops.json) but be aware if you deleted these files it will be reset meaning you would have to re-configure it again!

If you need any help with your service don’t hesitate to contact us through our support tickets at https://billing.xgamingserver

Ready to play?

Run your own Minecraft server with XGamingServer

Spin up an always-on Minecraft server your friends can join in minutes — no port-forwarding, no tech headaches.

99.9%Uptime SLA
< 5 minInstant setup
24/7Human support
DDoSProtected
Instant setup Your server is live in minutes with a one-click control panel.
Mods & plugins Install mods, plugins and workshop content in a few clicks.
DDoS protected Enterprise DDoS mitigation keeps your server online 24/7.
Low-latency hardware Premium CPUs & NVMe SSDs for lag-free multiplayer.
Free backups Automatic backups so your world is never lost.
Real human support Gamers helping gamers — 24/7, no bots, no scripts.

Pick your Minecraft plan & play in minutes

See all plans
Starter $8.40/mo 4 GB RAM Renews $12/mo Buy now
Rookie $17.50/mo 8 GB RAM Renews $25/mo Buy now
Pro $24.50/mo 12 GB RAM Renews $35/mo Buy now