@@ -712,6 +712,10 @@ private struct _JSONKeyedEncodingContainer<K : CodingKey> : KeyedEncodingContain
712712 public mutating func encode( _ value: Int64 , forKey key: Key ) throws {
713713 reference. insert ( self . encoder. wrap ( value) , for: _converted ( key) )
714714 }
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+ }
715719 public mutating func encode( _ value: UInt , forKey key: Key ) throws {
716720 reference. insert ( self . encoder. wrap ( value) , for: _converted ( key) )
717721 }
@@ -727,6 +731,10 @@ private struct _JSONKeyedEncodingContainer<K : CodingKey> : KeyedEncodingContain
727731 public mutating func encode( _ value: UInt64 , forKey key: Key ) throws {
728732 reference. insert ( self . encoder. wrap ( value) , for: _converted ( key) )
729733 }
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+ }
730738 public mutating func encode( _ value: String , forKey key: Key ) throws {
731739 reference. insert ( self . encoder. wrap ( value) , for: _converted ( key) )
732740 }
@@ -827,11 +835,15 @@ private struct _JSONUnkeyedEncodingContainer : UnkeyedEncodingContainer {
827835 public mutating func encode( _ value: Int16 ) throws { self . reference. insert ( self . encoder. wrap ( value) ) }
828836 public mutating func encode( _ value: Int32 ) throws { self . reference. insert ( self . encoder. wrap ( value) ) }
829837 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) ) }
830840 public mutating func encode( _ value: UInt ) throws { self . reference. insert ( self . encoder. wrap ( value) ) }
831841 public mutating func encode( _ value: UInt8 ) throws { self . reference. insert ( self . encoder. wrap ( value) ) }
832842 public mutating func encode( _ value: UInt16 ) throws { self . reference. insert ( self . encoder. wrap ( value) ) }
833843 public mutating func encode( _ value: UInt32 ) throws { self . reference. insert ( self . encoder. wrap ( value) ) }
834844 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) ) }
835847 public mutating func encode( _ value: String ) throws { self . reference. insert ( self . encoder. wrap ( value) ) }
836848
837849 public mutating func encode( _ value: Float ) throws {
@@ -908,6 +920,12 @@ extension __JSONEncoder : SingleValueEncodingContainer {
908920 assertCanEncodeNewValue ( )
909921 self . storage. push ( ref: wrap ( value) )
910922 }
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+ }
911929
912930 public func encode( _ value: UInt ) throws {
913931 assertCanEncodeNewValue ( )
@@ -933,6 +951,12 @@ extension __JSONEncoder : SingleValueEncodingContainer {
933951 assertCanEncodeNewValue ( )
934952 self . storage. push ( ref: wrap ( value) )
935953 }
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+ }
936960
937961 public func encode( _ value: String ) throws {
938962 assertCanEncodeNewValue ( )
@@ -967,11 +991,15 @@ private extension __JSONEncoder {
967991 @inline ( __always) func wrap( _ value: Int16 ) -> JSONReference { . number( from: value) }
968992 @inline ( __always) func wrap( _ value: Int32 ) -> JSONReference { . number( from: value) }
969993 @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) }
970996 @inline ( __always) func wrap( _ value: UInt ) -> JSONReference { . number( from: value) }
971997 @inline ( __always) func wrap( _ value: UInt8 ) -> JSONReference { . number( from: value) }
972998 @inline ( __always) func wrap( _ value: UInt16 ) -> JSONReference { . number( from: value) }
973999 @inline ( __always) func wrap( _ value: UInt32 ) -> JSONReference { . number( from: value) }
9741000 @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) }
9751003 @inline ( __always) func wrap( _ value: String ) -> JSONReference { . string( value) }
9761004
9771005 @inline ( __always)
@@ -1302,11 +1330,15 @@ extension Int8 : _JSONSimpleValueArrayElement { }
13021330extension Int16 : _JSONSimpleValueArrayElement { }
13031331extension Int32 : _JSONSimpleValueArrayElement { }
13041332extension Int64 : _JSONSimpleValueArrayElement { }
1333+ @available ( macOS 15 . 0 , iOS 18 . 0 , tvOS 18 . 0 , watchOS 11 . 0 , visionOS 2 . 0 , * )
1334+ extension Int128 : _JSONSimpleValueArrayElement { }
13051335extension UInt : _JSONSimpleValueArrayElement { }
13061336extension UInt8 : _JSONSimpleValueArrayElement { }
13071337extension UInt16 : _JSONSimpleValueArrayElement { }
13081338extension UInt32 : _JSONSimpleValueArrayElement { }
13091339extension UInt64 : _JSONSimpleValueArrayElement { }
1340+ @available ( macOS 15 . 0 , iOS 18 . 0 , tvOS 18 . 0 , watchOS 11 . 0 , visionOS 2 . 0 , * )
1341+ extension UInt128 : _JSONSimpleValueArrayElement { }
13101342extension String : _JSONSimpleValueArrayElement {
13111343 fileprivate func jsonRepresentation( options: JSONEncoder . _Options ) -> String {
13121344 self . serializedForJSON ( withoutEscapingSlashes: options. outputFormatting. contains ( . withoutEscapingSlashes) )
0 commit comments