Structure
JSONEncoder.OutputFormatting
iOS 8.0+
iPadOS 8.0+
Mac Catalyst 8.0+
macOS 10.10+
tvOS 9.0+
watchOS 2.0+
The output formatting options that determine the readability, size, and element order of an encoded JSON object.
struct OutputFormatting
Topics
Initializers
init(rawValue: UInt)Creates an OutputFormatting value with the given raw value.
Instance Properties
let rawValue: UIntThe format’s default value.
Type Properties
static let prettyPrinted: JSONEncoder.OutputFormattingThe output formatting option that uses ample white space and indentation to make output easy to read.static let sortedKeys: JSONEncoder.OutputFormattingThe output formatting option that sorts keys in lexicographic order.static let withoutEscapingSlashes: JSONEncoder.OutputFormattingThe output formatting option specifies that the output doesn’t prefix slash characters with escape characters.
Relationships
Conforms To
Swift.EquatableSwift.ExpressibleByArrayLiteralSwift.OptionSetSwift.RawRepresentableSwift.SendableSwift.SendableMetatypeSwift.SetAlgebra