You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
JsonPath jsonPath = JsonPath.compile("$.data[*]"); Object parse = Configuration.builder().jsonProvider(new GsonJsonProvider()).build().jsonProvider().parse(testJson); JsonArray arrValues = jsonPath.read(parse); List<String> values = new Gson().fromJson(arrValues, new TypeToken<List<String>>() {}.getType());
Exception message:
Exception in thread "main" com.jayway.jsonpath.PathNotFoundException: Expected to find an object with property ['data'] in path $ but found 'com.google.gson.JsonObject'. This is not a json object according to the JsonProvider: 'com.jayway.jsonpath.spi.json.JsonSmartJsonProvider'.
The text was updated successfully, but these errors were encountered:
JsonPath jsonPath = JsonPath.compile("$.data[*]"); Object parse = Configuration.builder().jsonProvider(new GsonJsonProvider()).build().jsonProvider().parse(testJson); JsonArray arrValues = jsonPath.read(parse); List<String> values = new Gson().fromJson(arrValues, new TypeToken<List<String>>() {}.getType());
Exception message:
Exception in thread "main" com.jayway.jsonpath.PathNotFoundException: Expected to find an object with property ['data'] in path $ but found 'com.google.gson.JsonObject'. This is not a json object according to the JsonProvider: 'com.jayway.jsonpath.spi.json.JsonSmartJsonProvider'.
The text was updated successfully, but these errors were encountered: