MWhyte / jackson

Studying the need for jackson Mixins

Home Page:https://github.com/FasterXML/jackson

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Some techniques for getting around jackson mapping issues.

Jackson needs two things to work

  • A Default constructor
  • Properly named fields and getters (POJO spec)

But what if a domain class doesnt have these traits and you cant change them! (A class in a third party jar for example)

The use of Mixin's solves these problems

1. An object with no default constructor

Example: Website Domain Object

Mixin: WebsiteMixin

2. Non matching getters names

Example: Account Domain Object

Mixin: AccountMixin

About

Studying the need for jackson Mixins

https://github.com/FasterXML/jackson


Languages

Language:Java 100.0%