--- &test-5WE3
Title: Spec Example 8.17. Explicit Block Mapping Entries
Tags: [ comment, explicit-key, literal, mapping, sequence, spec ]
? explicit key # Empty value
? |
block key
: - one # Explicit compact
- two # block value
+STR
+DOC
+MAP
=VAL :explicit key
=VAL :
=VAL |block key\n
+SEQ
=VAL :one
=VAL :two
-SEQ
-MAP
-DOC
-STR
{
"block key\n": [
"one",
"two"
],
"explicit key": null
}
json_diff
parse error: Invalid numeric literal at line 1, column 25
json_diff
{
"block key\n": [
"one",
"two"
],
"explicit key": {}
}
error
Syck parser (line 2, column 2): syntax error at /perl5/lib/perl5/x86_64-linux-thread-multi/YAML/Syck.pm line 60, <> line 1.
error
Syck parser (line 2, column 2): syntax error at /perl5/lib/perl5/x86_64-linux-thread-multi/YAML/Syck.pm line 60, <> line 1.
error
YAML Error: Invalid element in map
Code: YAML_LOAD_ERR_BAD_MAP_ELEMENT
Line: 2
Document: 1
at /perl5/lib/perl5/YAML/Loader.pm line 360.
error
YAML Error: Invalid element in map
Code: YAML_LOAD_ERR_BAD_MAP_ELEMENT
Line: 2
Document: 1
at /perl5/lib/perl5/YAML/Loader.pm line 360.
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 =SYNX|?
1 1 1 1 =WSPC|.
1 2 2 2 +NODE|
1 2 2 2 +VAL |
1 2 2 2 =TEXT|explicit.key
1 14 14 14 -VAL |
1 14 14 14 -NODE|
1 14 14 14 =WSPC|.
1 15 15 15 +COMM|
1 15 15 15 =SYNX|#
1 16 16 16 =META|.Empty.value
1 28 28 28 -COMM|
1 28 28 28 =EOL |\x0a
2 0 29 29 +NODE|
2 0 29 29 +VAL |
2 0 29 29 -VAL |
2 0 29 29 -NODE|
2 0 29 29 -PAIR|
2 0 29 29 +PAIR|
2 0 29 29 =SYNX|?
2 1 30 30 +NODE|
2 1 30 30 =WSPC|.
2 2 31 31 +VAL |
2 2 31 31 =SYNX||
2 3 32 32 =EOL |\x0a
3 0 33 33 =DENT|..
3 2 35 35 =TEXT|block.key
3 11 44 44 =NEWL|\x0a
4 0 45 45 -VAL |
4 0 45 45 -NODE|
4 0 45 45 =SYNX|:
4 1 46 46 =DENT|.
4 2 47 47 +NODE|
4 2 47 47 +SEQ |
4 2 47 47 =SYNX|-
4 3 48 48 =WSPC|.
4 4 49 49 +NODE|
4 4 49 49 +VAL |
4 4 49 49 =TEXT|one
4 7 52 52 -VAL |
4 7 52 52 -NODE|
4 7 52 52 =WSPC|.
4 8 53 53 +COMM|
4 8 53 53 =SYNX|#
4 9 54 54 =META|.Explicit.compact
4 26 71 71 -COMM|
4 26 71 71 =EOL |\x0a
5 0 72 72 =DENT|..
5 2 74 74 =SYNX|-
5 3 75 75 =WSPC|.
5 4 76 76 +NODE|
5 4 76 76 +VAL |
5 4 76 76 =TEXT|two
5 7 79 79 -VAL |
5 7 79 79 -NODE|
5 7 79 79 =WSPC|.
5 8 80 80 +COMM|
5 8 80 80 =SYNX|#
5 9 81 81 =META|.block.value
5 21 93 93 -COMM|
5 21 93 93 =EOL |\x0a
6 0 94 94 -SEQ |
6 0 94 94 -NODE|
6 0 94 94 -PAIR|
6 0 94 94 -MAP |
6 0 94 94 -NODE|
6 0 94 94 -DOC |
na
{
'block key
' => [
'one',
'two'
],
'explicit key' => undef
}
na
{
'block key
' => [
'one',
'two'
],
'explicit key' => undef
}
na
{
'block key
' => [
'one',
'two'
],
'explicit key' => undef
}
na
{'block key\n': ['one', 'two'], 'explicit key': None}
na
{'block key\n': ['one', 'two'], 'explicit key': None}
ni
YAML::Tiny does not support a feature in line '? explicit key # Empty value' at /yaml/bin/perl-tiny-json line 12.
ni
YAML::Tiny does not support a feature in line '? explicit key # Empty value' at /yaml/bin/perl-tiny-perl line 15.