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.