f28bca609a
This is a new API that makes it possible to do more interesting things with composition. It's currently write-only; doing composition on reads is much more difficult. |
||
---|---|---|
.. | ||
src | ||
pom.xml | ||
README.md |
Adapters
Prebuilt Moshi JsonAdapter
s for various things, such as Rfc3339DateJsonAdapter
for parsing java.util.Date
s
To use, supply an instance of your desired converter when building your Moshi
instance.
Moshi moshi = new Moshi.Builder()
.add(Date.class, new Rfc3339DateJsonAdapter())
//etc
.build();
Download
Download the latest JAR or grab via Maven:
<dependency>
<groupId>com.squareup.moshi</groupId>
<artifactId>moshi-adapters</artifactId>
<version>latest.version</version>
</dependency>
or Gradle:
implementation 'com.squareup.moshi:moshi-adapters:latest.version'
Snapshots of the development version are available in Sonatype's snapshots
repository.