I have a big PoJo, which translates into a 45 MB JSON string. I am using Jackson, and the writeValueAsString
method is taking more than 10–15 minutes to generate it.
If I generate a chunk of it, everything works reasonably quickly.
I looked at Gson
metrics and it seems slower than Jackson.
How could I speed it up?
Code is very straight-forward:
String jsonString = mapper.writeValueAsString(value);