com.google.gson.JsonSyntaxException

java.lang.IllegalStateException: NAME expected, but met BEGIN_OBJECT


Solutions on the web570

Solution icon of github
via GitHub by ssuukk
, 7 months ago
java.lang.IllegalStateException: NAME expected, but met BEGIN_OBJECT

Solution icon of github
java.lang.IllegalStateException: BEGIN_OBJECT expected, but met STRING

Solution icon of github
via GitHub by ssuukk
, 7 months ago
java.lang.IllegalStateException: NAME expected, but met STRING

Solution icon of github
via GitHub by mlesikov
, 7 months ago
java.lang.IllegalStateException: STRING expected, but met NAME Scopes: INSIDE_OBJECT>NAME>INSIDE_OBJECT Closed tags: Token: null Tokens queue: BEGIN_OBJECT, NAME, STRING, null Values queue: response, @name, test, null ```

Solution icon of github
java.lang.IllegalStateException: BEGIN_OBJECT expected, but met STRING Scopes: INSIDE_OBJECT>NAME>INSIDE_OBJECT>INSIDE_EMBEDDED_ARRAY>INSIDE_OBJECT Closed tags: 'Class3'/3 Token: null Tokens queue: null Values queue: , null

Solution icon of stackoverflow
java.lang.IllegalStateException: Expected a string but was BEGIN_OBJECT

Solution icon of github
via GitHub by bwarncke
, 8 months ago
java.lang.IllegalStateException: Expected BEGIN_OBJECT but was BEGIN_ARRAY

Solution icon of github
via GitHub by sabrinawilske
, 7 months ago
java.lang.IllegalStateException: Expected STRING but was BEGIN_OBJECT

Solution icon of github
via GitHub by MrPowerGamerBR
, 9 months ago
java.lang.IllegalStateException: Expected BEGIN_OBJECT but was NUMBER

Solution icon of github
java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING

Stack trace

  • com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: NAME expected, but met BEGIN_OBJECT at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:176) at com.google.gson.internal.bind.TypeAdapterRuntimeTypeWrapper.read(TypeAdapterRuntimeTypeWrapper.java:40) at com.google.gson.internal.bind.ArrayTypeAdapter.read(ArrayTypeAdapter.java:72) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:93) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:172) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:93) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:172) at com.google.gson.internal.bind.TypeAdapterRuntimeTypeWrapper.read(TypeAdapterRuntimeTypeWrapper.java:40) at com.google.gson.internal.bind.ArrayTypeAdapter.read(ArrayTypeAdapter.java:72) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:93) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:172) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:93) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:172) at com.google.gson.Gson.fromJson(Gson.java:795) at com.stanfy.gsonxml.GsonXml.fromXml(GsonXml.java:92) at com.stanfy.gsonxml.GsonXml.fromXml(GsonXml.java:66) at com.stanfy.gsonxml.GsonXml.fromXml(GsonXml.java:52) at com.stanfy.gsonxml.GsonXml.fromXml(GsonXml.java:42) at pl.qus.xenoamp.helper.Jxml.Deserialize(Jxml.java:28) at pl.qus.musicbrainz.MBParser.find(MBParser.java:40) at pl.qus.musicbrainz.MBParser.test(MBParser.java:102) at pl.qus.xenoamp.XenoAmp$Testowy.run(XenoAmp.java:162) at java.lang.Thread.run(Thread.java:856) Caused by: java.lang.IllegalStateException: NAME expected, but met BEGIN_OBJECT at com.stanfy.gsonxml.XmlReader.expect(XmlReader.java:137) at com.stanfy.gsonxml.XmlReader.nextName(XmlReader.java:338) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:167) ... 22 more

Write tip

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

Users with the same issue

You are the first who have seen this exception. Write a tip to help other users and build your expert profile.