You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
throwDecodingError.dataCorrupted(DecodingError.Context(codingPath:self.codingPath, debugDescription:"Parsed JSON number <\(number)> does not fit in \(type)."))
throwDecodingError.dataCorrupted(DecodingError.Context(codingPath:self.codingPath, debugDescription:"Parsed JSON number <\(number)> does not fit in \(type)."))
throwDecodingError.dataCorrupted(DecodingError.Context(codingPath:self.codingPath, debugDescription:"Parsed JSON number <\(number)> does not fit in \(type)."))
throwDecodingError.dataCorrupted(DecodingError.Context(codingPath:self.codingPath, debugDescription:"Parsed JSON number <\(number)> does not fit in \(type)."))
throwDecodingError.dataCorrupted(DecodingError.Context(codingPath:self.codingPath, debugDescription:"Parsed JSON number <\(number)> does not fit in \(type)."))
throwDecodingError.dataCorrupted(DecodingError.Context(codingPath:self.codingPath, debugDescription:"Parsed JSON number <\(number)> does not fit in \(type)."))
throwDecodingError.dataCorrupted(DecodingError.Context(codingPath:self.codingPath, debugDescription:"Parsed JSON number <\(number)> does not fit in \(type)."))
throwDecodingError.dataCorrupted(DecodingError.Context(codingPath:self.codingPath, debugDescription:"Parsed JSON number <\(number)> does not fit in \(type)."))
throwDecodingError.dataCorrupted(DecodingError.Context(codingPath:self.codingPath, debugDescription:"Parsed JSON number <\(number)> does not fit in \(type)."))
throwDecodingError.dataCorrupted(DecodingError.Context(codingPath:self.codingPath, debugDescription:"Parsed JSON number <\(number)> does not fit in \(type)."))
@@ -1916,6 +1933,7 @@ extension _JSONDecoder {
1916
1933
guard !(value is NSNull)else{returnnil}
1917
1934
1918
1935
iflet number = value as?NSNumber{
1936
+
try_checkNotBoolean(number, type: type)
1919
1937
// We are willing to return a Float by losing precision:
1920
1938
// * If the original value was integral,
1921
1939
// * and the integral value was > Float.greatestFiniteMagnitude, we will fail
@@ -1962,6 +1980,7 @@ extension _JSONDecoder {
1962
1980
guard !(value is NSNull)else{returnnil}
1963
1981
1964
1982
iflet number = value as?NSNumber{
1983
+
try_checkNotBoolean(number, type: type)
1965
1984
// We are always willing to return the number as a Double:
1966
1985
// * If the original value was integral, it is guaranteed to fit in a Double; we are willing to lose precision past 2^53 if you encoded a UInt64 but requested a Double
1967
1986
// * If it was a Float or Double, you will get back the precise value
0 commit comments