gson-jodatime-serialisers

A set of GSON serialisers/deserialisers for dealing with Joda Time entities.

License

License

Categories

Categories

Gson Data JSON
GroupId

GroupId

com.fatboyindustrial.gson-jodatime-serialisers
ArtifactId

ArtifactId

gson-jodatime-serialisers
Last Version

Last Version

1.8.0
Release Date

Release Date

Type

Type

jar
Description

Description

gson-jodatime-serialisers
A set of GSON serialisers/deserialisers for dealing with Joda Time entities.
Project URL

Project URL

https://github.com/gkopff/gson-jodatime-serialisers
Source Code Management

Source Code Management

https://github.com/gkopff/gson-jodatime-serialisers

Download gson-jodatime-serialisers

How to add to project

<!-- https://jarcasting.com/artifacts/com.fatboyindustrial.gson-jodatime-serialisers/gson-jodatime-serialisers/ -->
<dependency>
    <groupId>com.fatboyindustrial.gson-jodatime-serialisers</groupId>
    <artifactId>gson-jodatime-serialisers</artifactId>
    <version>1.8.0</version>
</dependency>
// https://jarcasting.com/artifacts/com.fatboyindustrial.gson-jodatime-serialisers/gson-jodatime-serialisers/
implementation 'com.fatboyindustrial.gson-jodatime-serialisers:gson-jodatime-serialisers:1.8.0'
// https://jarcasting.com/artifacts/com.fatboyindustrial.gson-jodatime-serialisers/gson-jodatime-serialisers/
implementation ("com.fatboyindustrial.gson-jodatime-serialisers:gson-jodatime-serialisers:1.8.0")
'com.fatboyindustrial.gson-jodatime-serialisers:gson-jodatime-serialisers:jar:1.8.0'
<dependency org="com.fatboyindustrial.gson-jodatime-serialisers" name="gson-jodatime-serialisers" rev="1.8.0">
  <artifact name="gson-jodatime-serialisers" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.fatboyindustrial.gson-jodatime-serialisers', module='gson-jodatime-serialisers', version='1.8.0')
)
libraryDependencies += "com.fatboyindustrial.gson-jodatime-serialisers" % "gson-jodatime-serialisers" % "1.8.0"
[com.fatboyindustrial.gson-jodatime-serialisers/gson-jodatime-serialisers "1.8.0"]

Dependencies

compile (3)

Group / Artifact Type Version
joda-time : joda-time jar 2.6
com.google.code.gson : gson jar 2.3.1
org.jetbrains.kotlin : kotlin-stdlib jar 1.3.21

test (3)

Group / Artifact Type Version
junit : junit jar 4.12
org.hamcrest : hamcrest-all jar 1.3
org.jetbrains.kotlin : kotlin-test jar 1.3.21

Project Modules

There are no modules declared in this project.

gson-jodatime-serialisers

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:

  • DateMidnight
  • DateTime
  • DateTimeZone
  • Duration
  • Interval
  • Instant
  • LocalDate
  • LocalDateTime
  • LocalTime
  • Period

Getting it

<dependency>
  <groupId>com.fatboyindustrial.gson-jodatime-serialisers</groupId>
  <artifactId>gson-jodatime-serialisers</artifactId>
  <version>1.8.0</version>
</dependency>

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).

Versions

Version
1.8.0
1.7.1
1.7.0
1.6.0
1.5.0
1.4.0
1.3.0
1.2.0
1.1.0
1.0.0