-
Notifications
You must be signed in to change notification settings - Fork 7
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
Incompatible with JsonTreeWriter
#22
Comments
One idea could be to propose adding support for this in GSON via internal holder type, so that when it tries to convert it to string it just takes the raw byte out of this holder |
I found these but nothing promising google/gson#1268 Put up a PR here google/gson#1819. GSON seems mostly abandoned though so not optimistic about it getting reviewed/merged. Those that need this should probably either move away from using
|
Uses internal APIs but this library isn't stable anyway. This works around that issue until a fixed future version of GSON that properly supports jsonValue in JsonTreeWriter (if ever) by converting it manually to a `JsonElement` and writing it directly via its `JsonElement` `TypeAdapter`. Resolves #22
When the incoming GSON
JsonWriter
isJsonTreeWriter
,jsonValue()
APIs will no longer work because GSON doesn't support writing raw JSON in this environment. Not sure if this is something we really can support, vs not allowing Moshi serializers to be preferred when we're in this condition. Not sure we can infer this ahead of time though.The text was updated successfully, but these errors were encountered: