java.lang.IllegalStateException: Expected BEGIN_OBJECT but was NULL

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Samebug tips

Do you know how to solve this issue? Write a tip to help other users and build your expert profile.

Solutions on the web

via GitHub by BishopGIS
, 1 year ago
Expected BEGIN_OBJECT but was NULL
via Stack Overflow by jampez77
, 4 months ago
Expected BEGIN_OBJECT but was NAME
via Stack Overflow by S.Holzhauer
, 9 months ago
Expected BEGIN_ARRAY but was BEGIN_OBJECT
java.lang.IllegalStateException: Expected BEGIN_OBJECT but was NULL
at android.util.JsonReader.expect(JsonReader.java:310)
at android.util.JsonReader.beginObject(JsonReader.java:293)
at com.nextgis.maplib.datasource.GeoGeometryFactory.fromJsonStream(GeoGeometryFactory.java:69)
at com.nextgis.maplib.util.GeoJSONUtil.readGeoJSONFeature(GeoJSONUtil.java:484)
at com.nextgis.maplib.util.GeoJSONUtil.createLayerFromGeoJSONStream(GeoJSONUtil.java:434)
at com.nextgis.maplib.map.VectorLayer.createFromGeoJson(VectorLayer.java:396)
at com.nextgis.maplibui.service.LayerFillService$VectorLayerFillTask.execute(LayerFillService.java:390)
at com.nextgis.maplibui.service.LayerFillService$2.run(LayerFillService.java:253)
at java.lang.Thread.run(Thread.java:841)

Users with the same issue

Samebug visitor profile picture
Unknown user
Once, 1 year ago

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.