What is it?

A set of GSON serialiser/deserialisers for dealing with Java 8 java.time entities. Wherever possible, ISO 8601 string representations are used.

Getting it


Using it

final Gson gson = Converters.registerOffsetDateTime(new GsonBuilder()).create();
final OffsetDateTime original =;

final String json = gson.toJson(original);
final OffsetDateTime reconstituted = gson.fromJson(json, OffsetDateTime.class);


Unrelated to gson-javatime-serialisers itself, but if you're working with Java 8 time, you may be interested in spencerwi/hamcrest-jdk8-time