What is it?

A set of Gson serialiser/deserialisers for dealing with Joda Time entities. Wherever possible, ISO 8601 string representations are used. The following Joda Time classes are handled:

Getting it


Using it

final Gson gson = Converters.registerDateTime(new GsonBuilder()).create();
final DateTime original = new DateTime();

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

Java version

Gson Joda Time serialisers uses Java 6 (as of 1.1.0 it is no longer compiled against Java 7).