Xgamingserver

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

Add comment