Answers for "java.lang.illegalstateexception: expected begin_object but was string at line 1 column 1 path $"

2

java.lang.IllegalStateException: Expected BEGIN_OBJECT but was BEGIN_ARRAY at line 1 column 2 path

Type collectionType = new TypeToken<Collection<ChannelSearchEnum>>(){}.getType();
Collection<ChannelSearchEnum> enums = gson.fromJson(yourJson, collectionType);
Posted by: Guest on August-29-2021
0

java.lang.illegalstateexception: expected begin_object but was string at line 1 column 1 path $

public static Object parseStringToObject(String json) {
    String Object = json;
    Gson gson = new Gson();
    Object objects = gson.fromJson(object, Object.class);
    parseConfigFromObjectToString(object);
    return objects;
}
Posted by: Guest on May-20-2021

Code answers related to "java.lang.illegalstateexception: expected begin_object but was string at line 1 column 1 path $"

Browse Popular Code Answers by Language