Function parseString

Parses YAML content and return a node suitable for parseConfig

YAMLNode parseString (
  string content,
  string path
);

Parses a string expecting to contain properly formatted YAML / JSON, with an optional associated path (or symbolic name) and returns a node that can then be passed to configy.read : parseConfig.

Parameters

NameDescription
content Content of the YAML / JSON document to read.
path Path to associate to the content. It may be null.

Returns

A mapping representing the document.

Throws

If loading the content failed.