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
try (Response okHttpResponse = client.httpClient.newCall(request).execute()) { if (!okHttpResponse.isSuccessful()) { logger.severe("Error in calling Rest API : " + okHttpResponse); throw new IOException("Unexpected code " + okHttpResponse); } // Handle the response try (ResponseBody responseBody = okHttpResponse.body()) { if (responseBody != null) { try (InputStream inputStream = responseBody.byteStream()) { model = JSON.parseObject(inputStream, Model.class); } } else { logger.severe("Empty response body "); } } logger.exiting(model); return model; }
My Model.class is using Jackson annotations(jackson 2.10.0 version class) -
Model.class
import com.fasterxml.jackson.annotation.JsonAnyGetter; import com.fasterxml.jackson.annotation.JsonAnySetter; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder;
While deserializing I am getting the error -
not support input PD94bWwgdmVyc2lvbj0iMWRSdzVk8+, offset 5476, character }, line 1, column 5476, fastjson-version 2.0.54
Is fastJson2 not compatible with jackson classes, or is it not able to read responseBody.byteStream() from OkHttp response?
responseBody.byteStream()
The text was updated successfully, but these errors were encountered:
No branches or pull requests
My
Model.class
is using Jackson annotations(jackson 2.10.0 version class) -While deserializing I am getting the error -
Is fastJson2 not compatible with jackson classes, or is it not able to read
responseBody.byteStream()
from OkHttp response?The text was updated successfully, but these errors were encountered: