mirror of
https://github.com/fankes/moshi.git
synced 2025-12-12 21:41:02 +08:00
* Update spotless and enable copyright header bits again * Reformat square copyright headers * Create separate format configuration for external files * Update CI to use java 15 final * include stacktrace in ci failures * Update ktlint to 0.39 * Disable java formatting on JDK 15 * Fix google header
Adapters
Prebuilt Moshi JsonAdapters for various things, such as Rfc3339DateJsonAdapter for parsing java.util.Dates
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.