We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
new JSONPages try to parse the response entity as a JSON object rather than as arbitrary JSON
could solve sorta like:
super(httpResponse); this.config = config; JsonElement jsonElement = JsonParser.parse(httpResponse.getBody()); if(!json.isJsonArray()) { json = jsonElement.toJsonElement(); JSONUtil.JsonQueryResponse queryResponse = JSONUtil.getJsonElementByPath(json, config.getResultPath()); insideElementJsonPathPart = queryResponse.getUnretrievedPath(); jsonElement = queryResponse.get(); } if (jsonElement.isJsonArray()) { iterator = queryResponse.getAsJsonArray().iterator(); } else if (jsonElement.isJsonObject()) { iterator = Collections.singleton(jsonElement).iterator(); } else { throw new IllegalArgumentException(String.format("Element found by '%s' json path is expected to be an object " + "or an array. Primitive found", config.getResultPath())); } fieldsMapping = config.getFullFieldsMapping(); schema = config.getSchema();
The text was updated successfully, but these errors were encountered:
@matt-carr thanks for reporting this. It didn't get the required attention because we track issues at https://issues.cask.co/. There's already an open bug for this - https://issues.cask.co/browse/PLUGIN-123.
Feel free to open a PR with this if you'd like to. We'd welcome the contribution.
Sorry, something went wrong.
No branches or pull requests
new JSONPages try to parse the response entity as a JSON object rather than as arbitrary JSON
could solve sorta like:
The text was updated successfully, but these errors were encountered: