Saturday, November 24, 2018

Velocity and rendering JSONObjects or Java Beans

You can use a Velocity template to render either a JsonNode or its corresponding Java bean,
without changing the velocity template.

Code is available here (the .wm file location is hardcoded with a Widows machine, sorry!)

and the full code is visible here

BEWARE the velocity template is stored under the resources folder

The only funny thing is that in the JsonNode the values retain the ""

No comments: