-
YAML string.
Declaration
Swift
public let yaml: String
-
Resolver.
Declaration
Swift
public let resolver: Resolver
-
Constructor.
Declaration
Swift
public let constructor: Constructor
-
Encoding
See moreDeclaration
Swift
public enum Encoding : String
-
Encoding
Declaration
Swift
public let encoding: Encoding
-
Set up a
Parser
with aString
value as input.Throws
Declaration
Swift
public init(yaml string: String, resolver: Resolver = .default, constructor: Constructor = .default, encoding: Encoding = .default) throws
Parameters
string
YAML string.
resolver
Resolver,
.default
if omitted.constructor
Constructor,
.default
if omitted.encoding
Encoding,
.default
if omitted. -
Set up a
Parser
with aData
value as input.Throws
Declaration
Swift
public convenience init(yaml data: Data, resolver: Resolver = .default, constructor: Constructor = .default, encoding: Encoding = .default) throws
Parameters
string
YAML Data encoded using the
encoding
encoding.resolver
Resolver,
.default
if omitted.constructor
Constructor,
.default
if omitted.encoding
Encoding,
.default
if omitted. -
Parse next document and return root Node.
Throws
Declaration
Swift
public func nextRoot() throws -> Node?
Return Value
next Node.
-
Parses the document expecting a single root Node and returns it.
Throws
Declaration
Swift
public func singleRoot() throws -> Node?
Return Value
Single root Node.