Andmemuundur is a common component for data formatting. Its main purpose is to transform backend JSON responses into a format that frontend is capable of printing out without any further data manipulation.
>**Why is this important?** The less data transformations are made in frontend, the less debugging, polyfilling etc needs to be done to achieve and maintain the same results with different frontend frameworks.
In addition, the current version of Andmemuundur is also capable of transforming HTML input into PDF and return it in base64 format.
## Development and licencing
| | |
|-|-|
| **Licence** | MIT |
| **Current version** | 2.0 |
| **Initially developed for** | State Portal eesti.ee, Information System Authority, Republic of Estonia |
| **Architect** | **Version 1.0** - Rainer Türner, Information System Authority, Republic of Estonia<br>**Version 2.0** - Rainer Türner, Information System Authority, Republic of Estonia |
| **Developers** | **Version 1.0** - Avalanche Laboratory OÜ / Vladislav Alenitsev<br>**Version 2.0** - Reach-U AS / lead developers Lauri All and Jens-Konrad Preem<br> |
| **Main usage** | Core backend component of Estonian State Portal eesti.ee since December 2018 |
| **Maturity** | Versions 1.0 and 2.0 pentested, stable in production |
| **Plans for the future** | 1. Full coverage of usage by sample configurations;<br>2. Docker images to easily test locally;<br>3. Re-write of core functionality to make service configurations easier to write. |
For security purposes, Tomcat should not be run under the root user. In this guide we create a new system user and group with home directory /opt/Tomcat that will run the Tomcat service.
Array is controlled by the "output_as_array" parameter in the mapping file. In this case "registrikood" is output as array (if more than 1 value exists in response).
To test this example the sample template `transformType.json` from templates_examples/ directory should be placed in the templates directory and the service should be restarted.