Requirement
We can set variables in Java that are passed to the AWK script, including Map instances:
Map<String, Object> someMap = new HashMap<String, Object>();
awk.script(program).input(input).variable("aMap", someMap).execute();
This is quite powerful but it still misses one important use case: passing a JSON object parsed with Jackson, which results in a combination of Map and List instances.
It would make the parsing of JSON objects particularly easy if Jawk could support List as a special AssocArray, where values are associated to a Long index (zero based).
Specifications
Wherever AVM handles Map variables, add support for List, and add the corresponding unit tests.
Requirement
We can set variables in Java that are passed to the AWK script, including Map instances:
This is quite powerful but it still misses one important use case: passing a JSON object parsed with Jackson, which results in a combination of
MapandListinstances.It would make the parsing of JSON objects particularly easy if Jawk could support List as a special AssocArray, where values are associated to a
Longindex (zero based).Specifications
Wherever AVM handles
Mapvariables, add support forList, and add the corresponding unit tests.