You are right @alfie.gordon.

Some object doesn’t have the listProperties() method, because they are not real objects (a collection of key/value pairs).
This is the case for arrays objects, which are lists of basic types, or real objects.

So to be really precise on the subject, if the property is an object, use the listProperties() method, else, use the get(0, properties.things.length()) to retrieve all elements of the list.

I also discovered this plugin jsoNest.
It allows to transform valid data as JSON strings representation of your data.
So you can say your plugin takes a string as argument, and cast back this string as a valid JSON object with the JSON.parse() method and everything works fine.

They have a really cool demo to illustrate the purpose of the plugin.

1 Like