If there is a single key with null value in the "... { contents: { data: { customData: { key: null }}}}" response JSON, PlacementDecision will throw a decoding error and will try to use the fall back array decoding next which will also fail.
In order to fix the problem I think you should add something like this on AnyCodable before hitting the throw Decoding error.
else if let isValueNil = try? decodeNil(forKey: key), isValueNil == true {
self = .null
}
If there is a single key with
null
value in the "... { contents: { data: { customData: { key: null }}}}" response JSON,PlacementDecision
will throw a decoding error and will try to use the fall back array decoding next which will also fail.In order to fix the problem I think you should add something like this on
AnyCodable
before hitting the throw Decoding error.