Loader.fromString

Construct a Loader to load YAML from a string (char []).

struct Loader
static
fromString
@safe
(
char[] data
)

Return Value

Type: Loader

Loader loading YAML from given string.

Throws

YAMLException if data could not be read (e.g. a decoding error)

Examples

assert(Loader.fromString(cast(char[])"42").load().as!int == 42);

Meta