matthewcheok / JSONCodable

Hassle-free JSON encoding and decoding in Swift
MIT License
602 stars 66 forks source link

Empty array instead of MissingTypeError #50

Closed lightsprint09 closed 7 years ago

lightsprint09 commented 8 years ago

In JSONDecodable Line 197 an empty array gets return. Why is there no MissingTypeError thrown. This pattern can be found in more places.

It does not make sense to return an empty array if the key is unavailable.

Nadohs commented 7 years ago

thanks for fixing this 👍