I want to generate a JSON string that I put into a velocity template. How can I leverage the existing Jackson Mapper that is apparently used behind the scenes to generate JSON for REST requests? I specifically do not want to use a third-party JSON generation tool, because the generated JSON must be compatible with that that is later read by Jackson when the data are returned to the server via REST.
Community moderators have prevented the ability to post new answers.
Nevermind, I used new Gson().toJson(...)
and skipped the idea of using Jackson in both areas. Fingers crossed that this continues to work.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.