I got a map that extends three layers deep and on the other side I got a plugin that should check if a given three-set of strings is in the map. So far it’s a statically written map directly in the plugin file, but I want to change it so that user of the plugin can freely configure the map.
def myMap = [ 'level1' : [ 'level21' : [ 'level31: true, 'level32' : true, 'level33' : true ], 'level22' : [ 'level31' : true, 'level32' : true ] ] ] assert myMap.get('level1').get('level21').get('level32') == true
Needless to say, this is a ton of syntax overhead and not exactly flexible either. My idea was that this could be written in an external .properties file as nested DSL, but I don’t know what the best way to do that.