-
Notifications
You must be signed in to change notification settings - Fork 7.3k
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
Gson converter is broken when converting string response body #1465
Comments
I do the simple test like below
The same problem happened again.
It goes safe. |
This is actually a Gson bug in not supporting this from RFC 7159 in its strict mode. However, supporting a way to enable lenient mode in Gson is the Retrofit bug here. |
First step: google/gson#771. Once Gson has a release we can consume the |
And here's the fix in Gson (google/gson#773) and Moshi (square/moshi#121) for supporting top-level value types. |
is there a way to test it using a new moshi release? |
For Gson it still requires an update to Retrofit to use its new API. For Moshi, once its v1.1 released (hopefully today, maybe tomorrow), all that is needed is ensuring you are using its latest version with any version of Retrofit. |
thanks for the update! |
FYI Gson 2.6.1 was released with RFC 7159 support which should allow this to work with any version of Retrofit without needing Gson to be set to lenient. That said, I'm still adding support for honoring leniency in Retrofit's Gson converter (and using this issue to track). |
Great news about this. Thanks. |
See the log.
The library based on
The text was updated successfully, but these errors were encountered: