rP11584 introduced technologies and the simulation component TechnologyTemplateManager.js which was renamed to DataTemplateManager in rP18100.
rP13225 introduced the interface for this simulation component so that the AI could access it too.
Loading JSON files from the disk is a task that not only the simulation, but also the GUI and AI thread need to perform, possibly more.
So we need a globalscript if we don't want to reinvent the wheel.
We don't need any C++ code to do these things.
That will also allow the AI to load Aura files, parse team bonuses, judge the most valuable hero or relic and so forth.
Every context should be able to read JSON files from JS without any hassle. This should now be the case (#4868).
Nor should templates be serialized to begin with.