Enumeration
JSONEncoder.NonConformingFloatEncodingStrategy
iOS 8.0+
iPadOS 8.0+
Mac Catalyst 8.0+
macOS 10.10+
tvOS 9.0+
watchOS 2.0+
The strategies for encoding nonconforming floating-point numbers, also known as IEEE 754 exceptional values.
enum NonConformingFloatEncodingStrategy
Overview
The IEEE 754 floating-point specification defines exceptional values, which include doc://com.apple.documentation/documentation/swift/floatingpoint/infinity and doc://com.apple.documentation/documentation/swift/floatingpoint/nan.
Topics
Enumeration Cases
case convertToString(positiveInfinity: String, negativeInfinity: String, nan: String)The strategy that encodes exceptional floating-point values from a specified string representation.case `throw`The strategy that throws an error upon encoding an exceptional floating-point value. This is the default strategy.
Relationships
Conforms To
Swift.SendableSwift.SendableMetatype