Skip to content
This repository has been archived by the owner. It is now read-only.
Jackson extension to add support for the generated constructors of Project Lombok objects
Java
Branch: master
Clone or download
Latest commit e36e729 Jan 30, 2016
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src Rename package jackson -> jacksonlombok Nov 24, 2014
.gitignore Add intellij files to gitignore Nov 24, 2014
LICENSE Initial commit Nov 20, 2014
README.md Update documentation to add the fact that jackson supports Jan 30, 2016
pom.xml Release 1.1 Jan 30, 2016

README.md

Jackson Lombok

This repository contains extension for Jackson which allows better interoperability with Lombok classes.

The JacksonLombokAnnotationIntrospector allows Jackson to serialize and deserialize classes with constructors that are annotated with the java.beans.ConstructorProperties annotations. Lombok will automatically add this annotation to the constructors it generates.

This project is compatible with Jackson 2.4 - 2.6. Jackson 2.7 added support for ConstructorProperties which makes this project obsolete.

Usage

Add the JacksonLombokAnnotationIntrospector to the Jackson ObjectMapper in the following manner.

new ObjectMapper()
    .setAnnotationIntrospector(new JacksonLombokAnnotationIntrospector());

Now you can serialize and deserialize Lombok objects with generated constructors like the following class.

@Value
private static class ImmutablePojo {
    @JsonProperty("new_name")
    String name;
    @JsonProperty
    String string;
}

##Installation Add the following maven depency

<dependency>
    <groupId>com.xebia</groupId>
    <artifactId>jackson-lombok</artifactId>
    <version>1.1</version>
</dependency>

##Licence All files are provided under an MIT license.

You can’t perform that action at this time.