Skip to content

A set of GSON serialiser/deserialisers for dealing with 'three ten' Java 7 backport of the java.time entities.

License

Notifications You must be signed in to change notification settings

gkopff/gson-threeten-serialisers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

gson-threeten-serialisers

What is it?

A set of GSON serialiser/deserialisers for dealing with Java 7 "three ten" backport of the java.time entities. Wherever possible, ISO 8601 string representations are used.

Note: if you are using Java 8 then you're in the wrong place - use the gson-javatime-serialisers instead.

Getting it

(Details to be included once released to Maven Central)

Using it

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

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

About

A set of GSON serialiser/deserialisers for dealing with 'three ten' Java 7 backport of the java.time entities.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages