Closed MihaelIsaev closed 6 years ago
You should try to decode it as an [AddOn]?
. This will force the decoder to use decodeIfPresent
that will return nil if the key does not exist.
@ShawnMoore
You should try to decode it as an
[AddOn]?
. This will force the decoder to usedecodeIfPresent
that will return nil if the key does not exist.
I'm still getting DecodingError.keyNotFound: Value required for key 'Index 0.description'.
even when I decoding it as [AddOn]?
. Looks like it should be fixed
I have server response like this
I'm trying to decode it as
[AddOn]
but I'm getting error
DecodingError.keyNotFound: Value required for key 'Index 0.description'.
Is there any way to decode it properly into empty array or this framework just doesn't support decoding empty arrays?