Enumeration

JSONEncoder.NonConformingFloatEncodingStrategy

The strategies for encoding nonconforming floating-point numbers, also known as IEEE 754 exceptional values.

Declaration

enum JSONEncoder.NonConformingFloatEncodingStrategy

Overview

Exceptional values are defined by the IEEE 754 floating-point specification and include infinity and nan.

Topics

Exceptional Values

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.

See Also

Encoding Exceptional Numbers

var nonConformingFloatEncodingStrategy: JSONEncoder.NonConformingFloatEncodingStrategy

The strategy used by an encoder when it encounters exceptional floating-point values.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software