--- &test-Z67P
Title: Spec Example 8.21. Block Scalar Nodes [1.3]
Tags: [ 1.3-mod, folded, indent, literal, local-tag, spec, tag ]
literal: |2
value
folded: !foo >1
value
+STR
+DOC
+MAP
=VAL :literal
=VAL |value\n
=VAL :folded
=VAL <!foo> >value\n
-MAP
-DOC
-STR
{
"folded": "value\n",
"literal": "value\n"
}
na
Line Col Char Byte Token|Content
1 0 0 0 +DOC |
1 0 0 0 +NODE|
1 0 0 0 +MAP |
1 0 0 0 +PAIR|
1 0 0 0 +NODE|
1 0 0 0 +VAL |
1 0 0 0 =TEXT|literal
1 7 7 7 -VAL |
1 7 7 7 -NODE|
1 7 7 7 =SYNX|:
1 8 8 8 +NODE|
1 8 8 8 =WSPC|.
1 9 9 9 +VAL |
1 9 9 9 =SYNX||
1 10 10 10 =SYNX|2
1 11 11 11 =EOL |\x0a
2 0 12 12 =DENT|..
2 2 14 14 =TEXT|value
2 7 19 19 =NEWL|\x0a
3 0 20 20 -VAL |
3 0 20 20 -NODE|
3 0 20 20 -PAIR|
3 0 20 20 +PAIR|
3 0 20 20 +NODE|
3 0 20 20 +VAL |
3 0 20 20 =TEXT|folded
3 6 26 26 -VAL |
3 6 26 26 -NODE|
3 6 26 26 =SYNX|:
3 7 27 27 +NODE|
3 7 27 27 =WSPC|.
3 8 28 28 +PROP|
3 8 28 28 +TAG |
3 8 28 28 +HAND|
3 8 28 28 =SYNX|!
3 9 29 29 -HAND|
3 9 29 29 =META|foo
3 12 32 32 -TAG |
3 12 32 32 -PROP|
3 12 32 32 =WSPC|.
3 13 33 33 +VAL |
3 13 33 33 =SYNX|>
3 14 34 34 =SYNX|1
3 15 35 35 =EOL |\x0a
4 0 36 36 =DENT|.
4 1 37 37 =TEXT|value
4 6 42 42 =NEWL|\x0a
5 0 43 43 -VAL |
5 0 43 43 -NODE|
5 0 43 43 -PAIR|
5 0 43 43 -MAP |
5 0 43 43 -NODE|
5 0 43 43 -DOC |
na
{
'folded' => 'value
',
'literal' => 'value
'
}
na
{
'folded' => 'value
',
'literal' => 'value
'
}
na
{
'folded' => 'value
',
'literal' => 'value
'
}
na
{
'folded' => 'value
',
'literal' => 'value
'
}
na
{
'folded' => 'value
',
'literal' => 'value
'
}
na
{'folded': GenericScalar(tag='!foo', content='value\n'), 'literal': 'value\n'}
na
{'folded': GenericScalar(tag='!foo', content='value\n'), 'literal': 'value\n'}
ni
Unhandled exception. YamlDotNet.Core.YamlException: (Line: 3, Col: 9, Idx: 28) - (Line: 5, Col: 1, Idx: 43): Encountered an unresolved tag '!foo'
at YamlDotNet.Serialization.NodeTypeResolvers.PreventUnknownTagsNodeTypeResolver.YamlDotNet.Serialization.INodeTypeResolver.Resolve(NodeEvent nodeEvent, Type& currentType)
at YamlDotNet.Serialization.ValueDeserializers.NodeValueDeserializer.GetTypeFromEvent(NodeEvent nodeEvent, Type currentType)
at YamlDotNet.Serialization.ValueDeserializers.NodeValueDeserializer.DeserializeValue(IParser parser, Type expectedType, SerializerState state, IValueDeserializer nestedObjectDeserializer)
at YamlDotNet.Serialization.ValueDeserializers.AliasValueDeserializer.DeserializeValue(IParser parser, Type expectedType, SerializerState state, IValueDeserializer nestedObjectDeserializer)
at YamlDotNet.Serialization.ValueDeserializers.NodeValueDeserializer.<>c__DisplayClass3_0.<DeserializeValue>b__0(IParser r, Type t)
at YamlDotNet.Serialization.NodeDeserializers.DictionaryNodeDeserializer.DeserializeHelper(Type tKey, Type tValue, IParser parser, Func`3 nestedObjectDeserializer, IDictionary result)
at YamlDotNet.Serialization.NodeDeserializers.DictionaryNodeDeserializer.YamlDotNet.Serialization.INodeDeserializer.Deserialize(IParser parser, Type expectedType, Func`3 nestedObjectDeserializer, Object& value)
at YamlDotNet.Serialization.ValueDeserializers.NodeValueDeserializer.DeserializeValue(IParser parser, Type expectedType, SerializerState state, IValueDeserializer nestedObjectDeserializer)
at YamlDotNet.Serialization.ValueDeserializers.AliasValueDeserializer.DeserializeValue(IParser parser, Type expectedType, SerializerState state, IValueDeserializer nestedObjectDeserializer)
at YamlDotNet.Serialization.Deserializer.Deserialize(IParser parser, Type type)
at YamlDotNet.Serialization.Deserializer.Deserialize(TextReader input, Type type)
at YamlDotNet.Serialization.Deserializer.Deserialize(TextReader input)
at Program.Main(String[] commandLineArguments)
Aborted (core dumped)
ni
/node/node_modules/js-yaml/lib/loader.js:187
throw generateError(state, message);
^
YAMLException: unknown tag !<!foo> (5:1)
2 | value
3 | folded: !foo >1
4 | value
5 |
-----^
at generateError (/node/node_modules/js-yaml/lib/loader.js:183:10)
at throwError (/node/node_modules/js-yaml/lib/loader.js:187:9)
at composeNode (/node/node_modules/js-yaml/lib/loader.js:1521:7)
at readBlockMapping (/node/node_modules/js-yaml/lib/loader.js:1164:11)
at composeNode (/node/node_modules/js-yaml/lib/loader.js:1441:12)
at readDocument (/node/node_modules/js-yaml/lib/loader.js:1625:3)
at loadDocuments (/node/node_modules/js-yaml/lib/loader.js:1688:5)
at Object.loadAll (/node/node_modules/js-yaml/lib/loader.js:1701:19)
at Object.<anonymous> (/yaml/bin/js-jsyaml-json:7:13)
at Module._compile (node:internal/modules/cjs/loader:1358:14) {
reason: 'unknown tag !<!foo>',
mark: {
name: null,
buffer: 'literal: |2\n value\nfolded: !foo >1\n value\n',
position: 43,
line: 4,
column: 0,
snippet: ' 2 | value\n 3 | folded: !foo >1\n 4 | value\n 5 | \n-----^'
}
}
Node.js v20.13.1
ni
YAML::Tiny does not support a feature in line '!foo >1' at /yaml/bin/perl-tiny-json line 12.
ni
YAML::Tiny does not support a feature in line '!foo >1' at /yaml/bin/perl-tiny-perl line 15.