-
Line break options to use when emitting YAML.
See moreDeclaration
Swift
public enum LineBreak -
Retrieve this Emitter’s binary output.
Declaration
Swift
public internal(set) var data: Data { get } -
Configuration options to use when emitting YAML.
See moreDeclaration
Swift
public struct Options -
Configuration options to use when emitting YAML.
Declaration
Swift
public var options: Options { get set } -
init(canonical:indent: width: allowUnicode: lineBreak: explicitStart: explicitEnd: version: sortKeys: sequenceStyle: mappingStyle: newLineScalarStyle: redundancyAliasingStrategy: ) Create an
Emitterwith the specified options.Declaration
Swift
public init(canonical: Bool = false, indent: Int = 0, width: Int = 0, allowUnicode: Bool = false, lineBreak: LineBreak = .ln, explicitStart: Bool = false, explicitEnd: Bool = false, version: (major: Int, minor: Int)? = nil, sortKeys: Bool = false, sequenceStyle: Node.Sequence.Style = .any, mappingStyle: Node.Mapping.Style = .any, newLineScalarStyle: Node.Scalar.Style = .any, redundancyAliasingStrategy: RedundancyAliasingStrategy? = nil)Parameters
canonicalSet if the output should be in the “canonical” format described in the YAML specification.
indentSet the indentation value.
widthSet the preferred line width. -1 means unlimited.
allowUnicodeSet if unescaped non-ASCII characters are allowed.
lineBreakSet the preferred line break.
explicitStartExplicit document start
---.explicitEndExplicit document end
....versionThe
%YAMLdirective value or nil.sortKeysSet if emitter should sort keys in lexicographic order.
sequenceStyleSet the style for sequences (arrays / lists)
mappingStyleSet the style for mappings (dictionaries)
newLineScalarStyleSet the style for newline-containing scalars
redundancyAliasingStrategySet the strategy for identifying redundant structures and automatically aliasing them
-
Open & initialize the emitter.
Declaration
Swift
public func open() throws -
Close the
Emitter.Declaration
Swift
public func close() throws
View on GitHub
Install in Dash