bignerdranch / Freddy

A reusable framework for parsing JSON in Swift.
MIT License
1.09k stars 119 forks source link

Default to nil if is not convertible #162

Closed soheilbm closed 8 years ago

soheilbm commented 8 years ago

I noticed that if I try to decode a json with a int value but if the value is string I get BAD_EXCESS error. Is there anyway to make sure if the value is not covertible it return nil instead of throwing error ?