StructureFoundation5.9.0
OutputFormatting
The formatting of the output JSON data.
struct OutputFormatting
Citizens in Foundation
Conformances
protocol Equatable
A type that can be compared for value equality.
protocol ExpressibleByArrayLiteral
A type that can be initialized using an array literal.
protocol OptionSet
A type that presents a mathematical set interface to a bit set.
protocol RawRepresentable
A type that can be converted to and from an associated raw value.
protocol SetAlgebra
A type that provides mathematical set operations.
Members
init(rawValue: UInt
) Creates an OutputFormatting value with the given raw value.
static let prettyPrinted: JSONEncoder.OutputFormatting
Produce human-readable JSON with indented output.
static let sortedKeys: JSONEncoder.OutputFormatting
Produce JSON with dictionary keys sorted in lexicographic order.
static let withoutEscapingSlashes: JSONEncoder.OutputFormatting
By default slashes get escaped (”/” → “/”, “http://apple.com/” → “http://apple.com/”) for security reasons, allowing outputted JSON to be safely embedded within HTML/XML. In contexts where this escaping is unnecessary, the JSON is known to not be embedded, or is intended only for display, this option avoids this escaping.
let rawValue: UInt
The format’s default value.
Features
static func != (Self, Self
) -> Bool func isStrictSubset(of: Self
) -> Bool Returns a Boolean value that indicates whether this set is a strict subset of the given set.
func isStrictSuperset(of: Self
) -> Bool Returns a Boolean value that indicates whether this set is a strict superset of the given set.