Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Generate JSON string for template

Thomas Keller
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 7, 2015

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.

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Answer accepted
Thomas Keller
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 7, 2015

Nevermind, I used new Gson().toJson(...) and skipped the idea of using Jackson in both areas. Fingers crossed that this continues to work.

TAGS
AUG Leaders

Atlassian Community Events