Matthew Cheok

Results 37 comments of Matthew Cheok

What do you think about calling super and then making the change for one property? Debatably it's less efficient but Swift doesn't have optional protocol methods so we would have...

Sure feel free to submit a PR if necessary! I’m not entirely sure what’s needed to get this working. > On 14 Oct 2015, at 7:47 AM, eustas [email protected] wrote:...

Ideally, this library would become obsolete and we'd migrate to the new built-in `Codable` protocol in Swift 4. The only possible issue would be if we wanted to support multiple...

Yes I'm glad you asked! Swift requires you to initialise all properties in its initialiser and there's no dynamic way to assign values to properties automatically. Feel free to bounce...

That's what JSONCodable did initially but that seems like a big limitation for users to commit to. After all, Swift makes it easier to work with mutability and value types.

The above challenges make it difficult to implement but you're welcome to send in a PR and help us out!

Providing more verbose error messages is definitely a interesting goal. I could see why there might be some issues implementing this though. Any ideas?

Just throwing this out there but it would be pretty cool if to indicate where in the object graph the error occurred. Maybe like: ``` JSONError([ [index: 0, name: JSONDecodableError.IncompatibleType(type:...

Thanks for the PR! It looks like you thought through this. I'm just concerned this would be make it ambiguous which variant of `toJSON()` to override. 1) What do you...