Skip to content
New issue

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

If a task contains both a comment and a like then parsing would fail. #168

Merged
merged 1 commit into from
Jan 15, 2019

Conversation

ftclausen
Copy link
Contributor

@ftclausen ftclausen commented Jan 15, 2019

The presence of a like was unexpected and would lead to a parsing failure:

    ERROR [2019-01-15 00:21:03,721] org.jclouds.http.functions.ParseJson: Error parsing input: java.lang.IllegalStateException: Expected a string but was BEGIN_OBJECT at line 141 column 29 path $.values[4].comment.tasks[0].anchor.properties.
    ! java.lang.IllegalStateException: Expected a string but was BEGIN_OBJECT at line 141 column 29 path $.values[4].comment.tasks[0].anchor.properties.
    ! at com.google.gson.stream.JsonReader.nextString(JsonReader.java:838)
    ! at com.google.gson.internal.bind.TypeAdapters$16.read(TypeAdapters.java:422)
// rest of stack omitted

Using this diff as inspiration I have come up with a fix that can be used as is or as a base for something else.

closes #167

@cdancy cdancy self-assigned this Jan 15, 2019
@cdancy cdancy added this to the v2.4.0 milestone Jan 15, 2019
@cdancy
Copy link
Owner

cdancy commented Jan 15, 2019

Yeah we've had to do this in a few other places as well and is an acceptable solution when the returned json is not standard. LGTM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants