一日生涯

備忘録

Responseのvalueがnullの時に、CodableでDecodingError.valueNotFoundになってまうねん

Cons

?をつけるの忘れず

hoge = try container.decode(Hoge?.self, forKey: .hogeKey)

Ref

gist.github.com

所感

あれ、この前出来てたのにってなったのでまた起こりそうなので備忘として残しておく。