Moshi is a modern JSON library for Android and Java. It makes it easy to parse JSON into Java objects and Java back into JSON.
Don't forget, always read the README!
Built in Type Adapters
Moshi has built-in support for reading and writing Java’s core data types:
- Primitives (int, float, char...) and their boxed counterparts
(Integer, Float, Character...).
- Maps Strings Enums
It supports your model classes by writing them out field-by-field. In the example above Moshi uses these classes:
JSON into Java
serialize Java objects as JSON
This modified text is an extract of the original Stack Overflow Documentation created by following contributors
and released under CC BY-SA 3.0