Moshi
Moshi is a modern JSON library for Java and Kotlin that provides a simple and efficient way to parse JSON into Java/Kotlin objects and serialize objects back to JSON. It leverages Kotlin's language features and supports code generation for better performance and type safety. Developed by Square, it is designed as a successor to Gson with improved Kotlin support and a more modular architecture.
Developers should use Moshi when building Android or backend applications in Java or Kotlin that require JSON serialization/deserialization, especially in Kotlin-heavy projects where its first-class support for Kotlin features like data classes and null safety is beneficial. It is ideal for scenarios needing high performance, such as mobile apps with network APIs, due to its code generation option that avoids reflection overhead.