Skip to content
This repository has been archived by the owner on Jun 22, 2022. It is now read-only.

FasterXML/jackson-datatype-jdk7

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

87 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Project for Jackson module (jar) that adds supports for JDK datatypes included in version 7 which can not be directly supported by core databind due to baseline being JDK 6.

Status

Build Status Maven Central Javadoc

Starting with Jackson 2.7, this module will be DEPRECATED, as its handlers will be incorporated directly in core Databind.

Module is supported up until Jackson 2.6.

Usage

Maven dependency

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

<dependency>
  <groupId>com.fasterxml.jackson.datatype</groupId>
  <artifactId>jackson-datatype-jdk7</artifactId>
  <version>2.6.2</version>
</dependency>    

Registering module

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

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

after which functionality is available for all normal Jackson operations: you can read JSON into supported JDK7 types, as well as write values of such types as JSON, so that for example:

// TODO: real example
Path p = ...;
String json = mapper.writeValueAsString(p);

About

(DEPRECATED) -- included in `jackson-databind` as of Jackson 2.7

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages