Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mapping of simple JSON arrays (e.g. array of strings) #98

Open
mungler opened this issue Apr 14, 2022 · 0 comments
Open

Mapping of simple JSON arrays (e.g. array of strings) #98

mungler opened this issue Apr 14, 2022 · 0 comments

Comments

@mungler
Copy link
Contributor

mungler commented Apr 14, 2022

The existing code makes the assumption that if mapping an array, the objects in the array are JSON objects, i.e.:

[ { "some": "object", "foo":"bar",...}, { "another":"object", "bar":"baz", ... }, {...}, {...} ]

But if the JSON array is a simple array of strings, for example:

[ "one", "two", "three", .... ]

The app will crash with:

'*** -[NSDictionary initWithDictionary:copyItems:]: dictionary argument is not an NSDictionary'

This is because of the assumption made that the array objects are JSON objects, not simple values.

This pull request fixes this issue: #96

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant