The idea is that configuration can be described using a JSON schema.
The names decided by developers or users of the system should only occur at the highest level of the configuration. At the registry of the new item. For example, the name of the template, app, renderer, etc. All node names below that "top level" node are fixed.
For example, the actions configuration of a dialog currently has this format:
The names commit and cancel are nodes. Their names are arbitrarily decided. It's difficult to realize this configuration as a JSON schema.
However, if actions was expecting a list instead of a map then there would be a way to translate that.
Consider the following:
The configuration in JSON notation:
I'm interested to know what other people might think about this and it's feasibility? The end goal is to have a schema representation of all configurations registries in order to enable intellisense features of IDEs which support such things. See https://code.visualstudio.com/docs/languages/json
In the above example of dialog it seems like we might be able to make a change in the Map2BeanTransformer which checks if a List was supplied when a Map was expected. If so, call the List supporting set method for actions.
This version of setActions() simply converts the List into a Map keeping backwards compatibility.