-
Task
-
Resolution: Done
-
L3 - Default
-
None
-
S
Context:
Optimize can handle only primitive variables and will skip complex variables by default. However, it's possible to use the variable plugin to turn those complex variables into primitive ones.
Jan Rohwer created an Optimize plugin so that complex variables like
User user = { "firstName": "John", "lastName": "Doe" }
can be imported to Optimize and will be flattened to:
user.firstName = "John" user.lastName = "Doe"
You can find it here:
https://github.com/janhuddel/optimize-plugin-variable-flattener
As many other users could benefit from this plugin, we should add it to our Optimize example repo.
AT:
- the plugin from https://github.com/janhuddel/optimize-plugin-variable-flattener is added to the Optimize example repository
- there is a readme that explains how it works - similar to all the other plugin examples
- the readme mentions that the initial implementation was done by Jan Rohwer with a link to Github and a link to Provinzial Versicherungen where we also thank them for their contribution
- the example is adjusted so that it's more targeted towards a general use case (e.g. date formatting can be consistent in the engine and Optimize)
- if possible, try to make the example work without the maven ee-repo defined