Skip to content

Latest commit

 

History

History
42 lines (27 loc) · 1.25 KB

README.md

File metadata and controls

42 lines (27 loc) · 1.25 KB

Project to build Jackson module (jar) to support JSON serialization and deserialization of Joda data types.

Status

Build Status

As of version 2.0 module is usable and relatively extensive (more so than in-built support 1.9 had). Contributions are welcome!

Usage

Maven dependency

To use module on Maven-based projects, use following dependency:

<dependency>
  <groupId>com.fasterxml.jackson.datatype</groupId>
  <artifactId>jackson-datatype-joda</artifactId>
  <version>2.1.1</version>
</dependency>    

(or whatever version is most up-to-date at the moment)

Registering module

Like all standard Jackson modules (libraries that implement Module interface), registration is done as follows:

ObjectMapper mapper = new ObjectMapper();
mapper.registerModule(new JodaModule());

after which functionality is available for all normal Jackson operations: you can read JSON as Joda types, as well as write Joda values as JSON.

More

See Wiki for more information (javadocs, downloads).