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.
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.
Currently, we use
MoshiHelper
to dump and duplicate the JSON stream in order to lookaround critical information about deserialization (namelytype
).https://github.com/square/moshi/issues/89 addresses the problem in streaming and introduces
JsonAdapter.toJsonObject
/JsonAdapter.fromJsonObject
. And we can now considering replaceMoshiHelper
implementation withJsonObject
.