I have the following JSON.
{ "content" : "value" }
I have Jackson constructing the JSON string.
If the value is a multiline text, example:
A
B
C
What I see is: { "content" : "A\r\nB\r\nC" }
It explicitly sets \r\n
(CRLF) for every line.
I am wondering if I can configure Jackson to output this:
{ "content" : "A
B
C" }
Which is; A, B and C are rendered as 3 lines and not in 1 line as "A\r\nB\r\nC".
If I understand you correctly, you wonder why Jackson escapes linefeeds. If so, the answer can be found right here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With