I'm currently developing a tool to generate graphical output based on input:
- a reusable template to be used, which consists of: graphical template, descriptor containing also definition input attributes (values/objects),
- a JSON object with input values containing values.
And, this limits reusability of a template, as input attributes structure must match input JSON data structure.
I want to add another (optional) input to generator:
- declaration of
input JSON objecttransformation into a new
JSON object with new structure, which is then used for output generation.
Given there are:
- multiple templates with different input data structure,
- multiple instance data sources with different object structure,
- many-to-many "relationship" (output generation) between those templates and instance data sources.
The solution wouldn't require to duplicate each template and create variants for each data-source. Or, to create some custom solution to transform input instance JSON data before it is passed into the generation tool.
Wished / expected characteristics of library
- lightweight (I want banana, not a jungle),
- safe, ie. not a scripting language, which can access any Java object, but only given context,
- transformation definition (syntax) to be simple, and like more mathematical / declarative, instead of imperative.
Of course, I don't expect a perfect existing solution, but the best possible library for the use-case.