moshi/adapters
Jesse Wilson 24ac43a799 Change RuntimeJsonAdapterFactory to peek for type names.
This is a bit awkward because JsonReader.Options doesn't tell you
what its values are.

Also awkward because we don't yet have an equivalent to stream
the encode of the value.
2018-10-09 23:10:31 -04:00
..
src Change RuntimeJsonAdapterFactory to peek for type names. 2018-10-09 23:10:31 -04:00
pom.xml [maven-release-plugin] prepare for next development iteration 2018-09-24 22:55:49 -04:00
README.md Use direct link to adapters snapshots. 2018-04-06 16:23:51 -07:00

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.