Skip to content

Provides support for serializing and deserializing Joda objects as ISO strings using Jackson.

License

Notifications You must be signed in to change notification settings

Allogy/jackson-joda-iso

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jackson-joda-iso

Provides support for serializing and deserializing Joda objects as ISO 8601 strings using Jackson.

The existing Jackson support for Joda serializes Joda objects as objects specific to the class. This library allows us to serlialize our Joda objects as ISO 8601 strings so that they are highly compatible with other implementations.

"dateTime" : "2013-07-24T16:30:20.314-06:00",
"date": "2013-07-22",
"period": "P17Y4M",

Maven Usage

The project is available in Maven Central.

<dependency>
    <groupId>com.allogy.json</groupId>
    <artifactId>jackson-joda-iso</artifactId>
     <version>1.0</version>
</dependency>

Simple Usage Example

@JsonSerialize(using = ISODateTimeSerializer.class)
@JsonDeserialize(using = ISODateTimeDeserializer.class)
public DateTime getDateTime()
{
    return dateTime;
}

@JsonSerialize(using = ISODateTimeSerializer.class)
@JsonDeserialize(using = ISODateTimeDeserializer.class)
public void setDateTime(DateTime dateTime)
{
    this.dateTime = dateTime;
}

License

Copyright (c) 2013 Allogy Interactive.

Released under the Apache License, Version 2.0.

About

Provides support for serializing and deserializing Joda objects as ISO strings using Jackson.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages