golo-lang
golo-lang copied to clipboard
Arrays within Arrays not parsed properly when converting Json to Dynamic Object
Given this json
{
"id": "customerContacts",
"value": [["east","west"],["north","south"]]
}
The following code returns empty value for the value()
let dyno = JSON.toDynamicObjectFromJSONString( str )
dyno:value()
I looks like in parse method in the JSON module, an array within an array is not catered for.
The attached trimmed version fixes it but it doesn't cater for infinite nesting of arrays. Please review json.golo.zip
Can you please open a pull-request rather than posting a zip archive?
Sure. Can do that. no probs