Anviking / Decodable

[Probably deprecated] Swift 2/3 JSON unmarshalling done (more) right
MIT License
1.04k stars 73 forks source link

Decodable 0.5.0 returning NSNull from =>? operator #135

Closed JimRoepcke closed 7 years ago

JimRoepcke commented 7 years ago
let maybeTone: Any? = try j =>? "tone"

Executing that in the debugger with "tone": null results in:

(lldb) expr maybeTone
(Any?) $R0 = some {
  payload_data_0 = 0x0000000108988130 __kCFNull
  payload_data_1 = 0x0000000000000000
  payload_data_2 = 0x0000000000000000
  instance_type = 0x0000000114bfb608
}

In 0.4.3, after let maybeTone: AnyObject? = try j =>? "tone", maybeTone would have been nil.

Anviking commented 7 years ago

Thanks for reporting, should be fixed now.