Nested JSON Array of Arrays

Certified Lead Developer

I am trying to read the following JSON structure to a Dictionary object and conversely create JSON from a Dictionary object containing a list of lists, i.e. the equivalent of a JSON array of arrays.

{
    "lines": {
        "intensities": [
            [
                0.5
            ]
        ],
        "points": [
            [
                [
                    483.3474497412421,
                    287.48116291799363
                ]
            ]
        ]
    }
}

Firstly, when attempting to convert the JSON shown above using a!fromJson(), I get the following error:

 

Secondly, Appian seems to flatten the array of arrays when attempting to generate a JSON with an array of arrays from the Dictionary show below:

{
    lines: {
        intensities: {
            {
                0.5
            }
        },
        points: {
            {
                {
                    483.3474497412421,
                    287.48116291799363
                }
            }
        }
    }
}

Any advice on the issue would be greatly appreciated.

Note, the JSON API is a 3rd party API so I am unable to change the structure without introducing some middleware. I would like to avoid this if at all possible.

The only other option I can think of is parsing and creating the JSON structures with a set of custom expressions, i.e. not using a!fromJson() and a!toJson(). This would also not be ideal.

  Discussion posts and replies are publicly visible