Loader.fromBuffer

Loader fromBuffer(ubyte[] yamlData) @safe

Construct a Loader to load YAML from a buffer.

Parameters

yamlDataBuffer with YAML data to load. This may be e.g. a file loaded to memory or a string with YAML data. Note that buffer will be overwritten, as D:YAML minimizes memory allocations by reusing the input _buffer. Must not be deleted or modified by the user as long as nodes loaded by this Loader are in use! - Nodes may refer to data in this buffer. Note that D:YAML looks for byte-order-marks YAML files encoded in UTF-16/UTF-32 (and sometimes UTF-8) use to specify the encoding and endianness, so it should be enough to load an entire file to a buffer and pass it to D:YAML, regardless of Unicode encoding.

Throws

YAMLException if yamlData contains data illegal in YAML.
Loader fromBuffer(void[] yamlData) @system

Ditto