KeyValueObjectMapping icon indicating copy to clipboard operation
KeyValueObjectMapping copied to clipboard

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

Open mungler opened this issue 3 years ago • 0 comments

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: https://github.com/dchohfi/KeyValueObjectMapping/pull/96

mungler avatar Apr 14 '22 11:04 mungler