@@ -712,6 +712,10 @@ private struct _JSONKeyedEncodingContainer<K : CodingKey> : KeyedEncodingContain
712
712
public mutating func encode( _ value: Int64 , forKey key: Key ) throws {
713
713
reference. insert ( self . encoder. wrap ( value) , for: _converted ( key) )
714
714
}
715
+ @available ( macOS 15 . 0 , iOS 18 . 0 , tvOS 18 . 0 , watchOS 11 . 0 , visionOS 2 . 0 , * )
716
+ public mutating func encode( _ value: Int128 , forKey key: Key ) throws {
717
+ reference. insert ( self . encoder. wrap ( value) , for: _converted ( key) )
718
+ }
715
719
public mutating func encode( _ value: UInt , forKey key: Key ) throws {
716
720
reference. insert ( self . encoder. wrap ( value) , for: _converted ( key) )
717
721
}
@@ -727,6 +731,10 @@ private struct _JSONKeyedEncodingContainer<K : CodingKey> : KeyedEncodingContain
727
731
public mutating func encode( _ value: UInt64 , forKey key: Key ) throws {
728
732
reference. insert ( self . encoder. wrap ( value) , for: _converted ( key) )
729
733
}
734
+ @available ( macOS 15 . 0 , iOS 18 . 0 , tvOS 18 . 0 , watchOS 11 . 0 , visionOS 2 . 0 , * )
735
+ public mutating func encode( _ value: UInt128 , forKey key: Key ) throws {
736
+ reference. insert ( self . encoder. wrap ( value) , for: _converted ( key) )
737
+ }
730
738
public mutating func encode( _ value: String , forKey key: Key ) throws {
731
739
reference. insert ( self . encoder. wrap ( value) , for: _converted ( key) )
732
740
}
@@ -827,11 +835,15 @@ private struct _JSONUnkeyedEncodingContainer : UnkeyedEncodingContainer {
827
835
public mutating func encode( _ value: Int16 ) throws { self . reference. insert ( self . encoder. wrap ( value) ) }
828
836
public mutating func encode( _ value: Int32 ) throws { self . reference. insert ( self . encoder. wrap ( value) ) }
829
837
public mutating func encode( _ value: Int64 ) throws { self . reference. insert ( self . encoder. wrap ( value) ) }
838
+ @available ( macOS 15 . 0 , iOS 18 . 0 , tvOS 18 . 0 , watchOS 11 . 0 , visionOS 2 . 0 , * )
839
+ public mutating func encode( _ value: Int128 ) throws { self . reference. insert ( self . encoder. wrap ( value) ) }
830
840
public mutating func encode( _ value: UInt ) throws { self . reference. insert ( self . encoder. wrap ( value) ) }
831
841
public mutating func encode( _ value: UInt8 ) throws { self . reference. insert ( self . encoder. wrap ( value) ) }
832
842
public mutating func encode( _ value: UInt16 ) throws { self . reference. insert ( self . encoder. wrap ( value) ) }
833
843
public mutating func encode( _ value: UInt32 ) throws { self . reference. insert ( self . encoder. wrap ( value) ) }
834
844
public mutating func encode( _ value: UInt64 ) throws { self . reference. insert ( self . encoder. wrap ( value) ) }
845
+ @available ( macOS 15 . 0 , iOS 18 . 0 , tvOS 18 . 0 , watchOS 11 . 0 , visionOS 2 . 0 , * )
846
+ public mutating func encode( _ value: UInt128 ) throws { self . reference. insert ( self . encoder. wrap ( value) ) }
835
847
public mutating func encode( _ value: String ) throws { self . reference. insert ( self . encoder. wrap ( value) ) }
836
848
837
849
public mutating func encode( _ value: Float ) throws {
@@ -908,6 +920,12 @@ extension __JSONEncoder : SingleValueEncodingContainer {
908
920
assertCanEncodeNewValue ( )
909
921
self . storage. push ( ref: wrap ( value) )
910
922
}
923
+
924
+ @available ( macOS 15 . 0 , iOS 18 . 0 , tvOS 18 . 0 , watchOS 11 . 0 , visionOS 2 . 0 , * )
925
+ public func encode( _ value: Int128 ) throws {
926
+ assertCanEncodeNewValue ( )
927
+ self . storage. push ( ref: wrap ( value) )
928
+ }
911
929
912
930
public func encode( _ value: UInt ) throws {
913
931
assertCanEncodeNewValue ( )
@@ -933,6 +951,12 @@ extension __JSONEncoder : SingleValueEncodingContainer {
933
951
assertCanEncodeNewValue ( )
934
952
self . storage. push ( ref: wrap ( value) )
935
953
}
954
+
955
+ @available ( macOS 15 . 0 , iOS 18 . 0 , tvOS 18 . 0 , watchOS 11 . 0 , visionOS 2 . 0 , * )
956
+ public func encode( _ value: UInt128 ) throws {
957
+ assertCanEncodeNewValue ( )
958
+ self . storage. push ( ref: wrap ( value) )
959
+ }
936
960
937
961
public func encode( _ value: String ) throws {
938
962
assertCanEncodeNewValue ( )
@@ -967,11 +991,15 @@ private extension __JSONEncoder {
967
991
@inline ( __always) func wrap( _ value: Int16 ) -> JSONReference { . number( from: value) }
968
992
@inline ( __always) func wrap( _ value: Int32 ) -> JSONReference { . number( from: value) }
969
993
@inline ( __always) func wrap( _ value: Int64 ) -> JSONReference { . number( from: value) }
994
+ @available ( macOS 15 . 0 , iOS 18 . 0 , tvOS 18 . 0 , watchOS 11 . 0 , visionOS 2 . 0 , * )
995
+ @inline ( __always) func wrap( _ value: Int128 ) -> JSONReference { . number( from: value) }
970
996
@inline ( __always) func wrap( _ value: UInt ) -> JSONReference { . number( from: value) }
971
997
@inline ( __always) func wrap( _ value: UInt8 ) -> JSONReference { . number( from: value) }
972
998
@inline ( __always) func wrap( _ value: UInt16 ) -> JSONReference { . number( from: value) }
973
999
@inline ( __always) func wrap( _ value: UInt32 ) -> JSONReference { . number( from: value) }
974
1000
@inline ( __always) func wrap( _ value: UInt64 ) -> JSONReference { . number( from: value) }
1001
+ @available ( macOS 15 . 0 , iOS 18 . 0 , tvOS 18 . 0 , watchOS 11 . 0 , visionOS 2 . 0 , * )
1002
+ @inline ( __always) func wrap( _ value: UInt128 ) -> JSONReference { . number( from: value) }
975
1003
@inline ( __always) func wrap( _ value: String ) -> JSONReference { . string( value) }
976
1004
977
1005
@inline ( __always)
@@ -1302,11 +1330,15 @@ extension Int8 : _JSONSimpleValueArrayElement { }
1302
1330
extension Int16 : _JSONSimpleValueArrayElement { }
1303
1331
extension Int32 : _JSONSimpleValueArrayElement { }
1304
1332
extension Int64 : _JSONSimpleValueArrayElement { }
1333
+ @available ( macOS 15 . 0 , iOS 18 . 0 , tvOS 18 . 0 , watchOS 11 . 0 , visionOS 2 . 0 , * )
1334
+ extension Int128 : _JSONSimpleValueArrayElement { }
1305
1335
extension UInt : _JSONSimpleValueArrayElement { }
1306
1336
extension UInt8 : _JSONSimpleValueArrayElement { }
1307
1337
extension UInt16 : _JSONSimpleValueArrayElement { }
1308
1338
extension UInt32 : _JSONSimpleValueArrayElement { }
1309
1339
extension UInt64 : _JSONSimpleValueArrayElement { }
1340
+ @available ( macOS 15 . 0 , iOS 18 . 0 , tvOS 18 . 0 , watchOS 11 . 0 , visionOS 2 . 0 , * )
1341
+ extension UInt128 : _JSONSimpleValueArrayElement { }
1310
1342
extension String : _JSONSimpleValueArrayElement {
1311
1343
fileprivate func jsonRepresentation( options: JSONEncoder . _Options ) -> String {
1312
1344
self . serializedForJSON ( withoutEscapingSlashes: options. outputFormatting. contains ( . withoutEscapingSlashes) )
0 commit comments