Author Topic: com.google.gson.JsonSyntaxException Error  (Read 11934 times)

crazy

  • Administrator
  • Sr. Member
  • *******
  • Posts: 403
  • Karma: +6/-0
    • View Profile
    • STIPE website (This one!)
com.google.gson.JsonSyntaxException Error
« on: 26 May 2014, 23:36:51 »
If you get an error to something similar below, it means that one of your JSON files which contain user data for ops, whitelist, bannedip, or bannedplayers contains an invalid character or syntax.
json files require particular formatting to work.

There are many ways to fix this. Most simplest is to just delete all the JSON files and let Minecraft convert your existing TXT files to JSON again.


Code: [Select]
com.google.gson.JsonSyntaxException: com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 2 column 2
at com.google.gson.Gson.assertFullConsumption(Gson.java:779) ~[minecraft_server.jar:?]
at com.google.gson.Gson.fromJson(Gson.java:769) ~[minecraft_server.jar:?]
at ol.g(SourceFile:125) ~[minecraft_server.jar:?]
at ny.d(SourceFile:202) ~[minecraft_server.jar:?]
at ls.aE(SourceFile:461) ~[minecraft_server.jar:?]
at ls.e(SourceFile:153) ~[minecraft_server.jar:?]
at net.minecraft.server.MinecraftServer.run(SourceFile:339) [minecraft_server.jar:?]
at li.run(SourceFile:628) [minecraft_server.jar:?]
Caused by: com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 2 column 2
at com.google.gson.stream.JsonReader.syntaxError(JsonReader.java:1505) ~[minecraft_server.jar:?]
at com.google.gson.stream.JsonReader.checkLenient(JsonReader.java:1386) ~[minecraft_server.jar:?]
at com.google.gson.stream.JsonReader.doPeek(JsonReader.java:531) ~[minecraft_server.jar:?]
at com.google.gson.stream.JsonReader.peek(JsonReader.java:414) ~[minecraft_server.jar:?]
at com.google.gson.Gson.assertFullConsumption(Gson.java:775) ~[minecraft_server.jar:?]
... 7 more
   
   
« Last Edit: 30 May 2014, 21:45:17 by crazy »