kamikat / moshi-jsonapi

JSON API v1.0 Specification in Moshi.
MIT License
156 stars 34 forks source link

New moshi API #50

Closed kamikat closed 7 years ago

kamikat commented 7 years ago

Currently, we use MoshiHelper to dump and duplicate the JSON stream in order to lookaround critical information about deserialization (namely type).

https://github.com/square/moshi/issues/89 addresses the problem in streaming and introduces JsonAdapter.toJsonObject/JsonAdapter.fromJsonObject. And we can now considering replace MoshiHelper implementation with JsonObject.

kamikat commented 7 years ago

For reference only, the new moshi API supporting serialize/deserialize to primitive Java object removes some information from a JSON token stream. So, there's no known alternative to MoshiHelper.