This is a fork of JS-YAML which supports parsing of YAML into AST.
In additional to parsing YAML to AST, it has following features:
- restoration after the errors and reporting errors as a part of AST nodes.
- built-in support for
!includetag used in RAML
loadmethod can be used to load the tree and returns a
YAMLNodeclass is an ancestor for all node kinds. It's
kindfield determine node kind, one of
INCLUDE_REF. After node kind is determined, it can be cast to one of the
| class | important members | |-------|-------------------| |
endPositionprovide node range.| |
valuefield | |
valuefields | |
YAMLScalarScalars are one of the three main node types defined by YAML and are effectively leaf nodes.
There are many factors that can influence the type of datum represent in scalar node (context, schema, tag, etc.).
To help inspection of a
YAMLScalarto determine its datatype when a document uses the Core Schema, you can pass the
determineScalarTypefunction. It will return an enum value indicating
Once you know the type, there are also some helper functions to help read the value by passing them the string,