Skip to content

Add support for List in variables passed to Jawk #458

@bertysentry

Description

@bertysentry

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions