0

I would like to output json as a string with double quotes surrounding it and all double quotes inside the string escaped. Does Jackson Json provide any function to do it? What I want to do is exactly opposite of How to parse a JSON string into JsonNode in Jackson?.

Community
  • 1
  • 1
coolsuntraveler
  • 317
  • 5
  • 13

1 Answers1

0

Hm, I think doing that would make your output a string (formatted like JSON), as opposed to valid JSON.

I tested it with JSONLint, worth having a go yourself just in case I'm being a dunce.

SuperJumbo
  • 519
  • 3
  • 13