Skip to content
This repository has been archived by the owner on Dec 19, 2018. It is now read-only.

Latest commit

 

History

History
38 lines (30 loc) · 693 Bytes

README.md

File metadata and controls

38 lines (30 loc) · 693 Bytes

Simple Jackson library for some datatypes in Apache Commons Lang3

Right now only the Fraction class is supported

Usage

    <groupId>net.bramp.jackson</groupId>
    <artifactId>jackson-datatype-commons-lang3</artifactId>
    <version>1.0</version>
	import net.bramp.jackson.lang3.LangModule
	...

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

Examples

class Demo {
	Fraction fraction1 = Fraction.getFraction(1, 2);
	Fraction fraction2 = Fraction.getFraction(30000, 1001);
}
{
	"fraction1": "1/2",
	"fraction2": "29 971/1001"
}