Skip to content
This repository has been archived by the owner on Sep 28, 2022. It is now read-only.

Arrays within Arrays not parsed properly when converting Json to Dynamic Object #532

Open
gcameo opened this issue Jun 21, 2018 · 2 comments

Comments

@gcameo
Copy link

gcameo commented Jun 21, 2018

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

@jponge
Copy link
Contributor

jponge commented Jun 22, 2018

Can you please open a pull-request rather than posting a zip archive?

@gcameo
Copy link
Author

gcameo commented Jun 22, 2018

Sure. Can do that. no probs

gcameo added a commit to gcameo/golo-lang that referenced this issue Jun 22, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants