Right now only the Fraction class is supported
<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());
class Demo {
Fraction fraction1 = Fraction.getFraction(1, 2);
Fraction fraction2 = Fraction.getFraction(30000, 1001);
}
{
"fraction1": "1/2",
"fraction2": "29 971/1001"
}