Serializing BigInteger fields as String (in simple notation) using Jackson

Is there a way to serialize a BigInteger field in simple format as a field in a JavaScript JavaScript object, rather than a numeric value in exponential notation (which is Jackson's default behavior)?

+4
source share
1 answer

You can use a specific serializer defined using JsonSerialize annotation

http://jackson.codehaus.org/1.2.1/javadoc/org/codehaus/jackson/map/annotate/JsonSerialize.html

The problem is similar to this question:

Java for Jackson JSON Serialization: Money Fields

+3
source

Source: https://habr.com/ru/post/1434629/


All Articles