Moshi
A modern JSON library for Kotlin and Java. (by square)
jackson-modules-java8
Set of support modules for Java 8 datatypes (Optionals, date/time) and features (parameter names) (by FasterXML)
Our great sponsors
Moshi | jackson-modules-java8 | |
---|---|---|
17 | 3 | |
9,500 | 393 | |
0.8% | 0.0% | |
8.6 | 8.4 | |
12 days ago | 7 days ago | |
Kotlin | Java | |
Apache License 2.0 | Apache License 2.0 |
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Moshi
Posts with mentions or reviews of Moshi.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2023-04-14.
-
Kotlin DSL is Now the Default for New Gradle Builds
Honestly, when you look at a build.gradle.kts written by someone who knows what they're doing, it's not that bad (that reminds me, I should really clean up the build.gradle.kts on my personal project, I haven't heavily edited it since I knew a lot less about gradle...). For example, here's the build.gradle.kts for Moshi, a JSON serialization library from Square. It uses the root build.gradle.kts for the project a bit, which is here. The root one is a little more complex, but that's mostly because it has to deal with a multi-release build and has to configure a few plugins, like dokka. (If you're wondering where all the library versions are, they're here, using a new feature in Gradle you might like: The version catalog)
-
Modern Android Development in 2023
Moshi
-
Why don't you write unit tests and integration tests to ksp project
This approach is also used by square/moshi. You can also refer this.
-
Apple's Swift rewrite of its Foundation framework will be open source
Best practice in Android would be Moshi, which is written by many of the same authors as Gson but is still actively maintained. It's more or less a breaking upgrade from Gson.
-
Converting Json to Java object
Thanks for the info. Just checked the GitHub and it is indeed the case that Gson is not maintained anymore. The main dev left Google it seems and therefore abandoned Gson. He and some other people however created a new project called Moshi that's probably intended as a kind of Gson 3.0: https://github.com/square/moshi the last commit was three months ago and there are a crowd of contributors listed so I guess that's the better option than ye olde Gson.
-
Soursop and Ponies in Kona: A C++ Committee Trip Report
Java annotations have enabled compile-time reflection since Java 1.6, and of course it has been used for serialization: https://github.com/square/moshi/#codegen
-
What are the most common used (3rd party) libraries and frameworks used in Android development?
JSON de/serialization: Kotlin serialization, Moshi
-
Help parsing JSON with Retrofit & Moshi
However i am getting an error "Expected BEGIN-ARRAY but was BEGIN-OBJECT at $". Looking over the moshi documentation (https://github.com/square/moshi) I think I need to use an adapter as my JSON response starts with "{ }" not the expected "[ ]". I am just struggling to understand how to implement the adapter as I think the built in adapter should work.
- Moshi 1.13.0 with Kotlin 1.6 compatibility now available
-
Release Kotlin 1.6.0 · JetBrains/kotlin
Moshi users are currently blocked to update until Moshi 1.13.0 is released: https://github.com/square/moshi/issues/1368
jackson-modules-java8
Posts with mentions or reviews of jackson-modules-java8.
We have used some of these posts to build our list of alternatives
and similar projects.
-
What is the better way of formatting the date and time in an HTTP response body?
Ah I forgot you have to explicitly register the JavaTimeModule, did you do that when creating the object mapper? See https://github.com/FasterXML/jackson-modules-java8
-
The best way to compare two dates
Here's the source code. It uses the ISO-88601 format without timezone modifier, e.g. "2021-10-25T00:23:12" – or in other words the same format as LocalDateTime.toString().
-
Is there a preferred naming convention for Optional variables?
Let's say you have a REST API that returns customers. The service layer would talk to repository layer which would talk to the entity layer to ultimately get the Customer object. It makes the most sense just to return Optional to the controller, and using a certain serialization module, the Optional would automatically get translated to JSON.
What are some alternatives?
When comparing Moshi and jackson-modules-java8 you can also consider the following projects:
Jackson - Core part of Jackson that defines Streaming API as well as basic shared abstractions
Yasson - Eclipse Yasson project
Gson - A Java serialization/deserialization library to convert Java Objects into JSON and back
Jackson-datatype-money - Extension module to properly support datatypes of javax.money
kotlinx.serialization - Kotlin multiplatform / multi-format serialization
Jackson JSON Processor - Main Portal page for the Jackson project
Genson - Genson a fast & modular Java <> Json library
ktor-moshi - Ktor feature that adds Moshi JSON serialization support
JsonUnit - Compare JSON in your Unit Tests
LoganSquare - Screaming fast JSON parsing and serialization library for Android.
Moshi vs Jackson
jackson-modules-java8 vs Yasson
Moshi vs Gson
jackson-modules-java8 vs Jackson-datatype-money
Moshi vs kotlinx.serialization
jackson-modules-java8 vs Gson
Moshi vs Jackson JSON Processor
jackson-modules-java8 vs Genson
Moshi vs ktor-moshi
jackson-modules-java8 vs JsonUnit
Moshi vs LoganSquare
jackson-modules-java8 vs Jackson