--- &test-2EBW
Title: Allowed characters in keys
Tags: [ mapping, scalar ]
a!"#$%&'()*+,-./09:;<=>?@AZ[\]^_`az{|}~: safe
?foo: safe question mark
:foo: safe colon
-foo: safe dash
this is#not: a comment
+STR
+DOC
+MAP
=VAL :a!"#$%&'()*+,-./09:;<=>?@AZ[\\]^_`az{|}~
=VAL :safe
=VAL :?foo
=VAL :safe question mark
=VAL ::foo
=VAL :safe colon
=VAL :-foo
=VAL :safe dash
=VAL :this is#not
=VAL :a comment
-MAP
-DOC
-STR
{
"-foo": "safe dash",
":foo": "safe colon",
"?foo": "safe question mark",
"a!\"#$%&'()*+,-./09:;<=>?@AZ[\\]^_`az{|}~": "safe",
"this is#not": "a comment"
}
json_diff
{
"-foo": "safe dash",
"?foo": "safe question mark",
"a!\"#$%&'()*+,-./09:;<=>?@AZ[\\]^_`az{|}~": "safe",
"foo": "safe colon",
"this is#not": "a comment"
}
error
YAML::Tiny failed to classify line ':foo: safe colon' at /yaml/bin/perl-tiny-json line 12.
error
YAML::Tiny failed to classify line ':foo: safe colon' at /yaml/bin/perl-tiny-perl line 15.
error
YAML Error: Invalid element in map
Code: YAML_LOAD_ERR_BAD_MAP_ELEMENT
Line: 1
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: 1
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 +NODE|
1 0 0 0 +VAL |
1 0 0 0 =TEXT|a!"#$%&'()*+,-./09:;<=>?@AZ[\x5c]^_`az{|}~
1 39 39 39 -VAL |
1 39 39 39 -NODE|
1 39 39 39 =SYNX|:
1 40 40 40 =WSPC|.
1 41 41 41 +NODE|
1 41 41 41 +VAL |
1 41 41 41 =TEXT|safe
1 45 45 45 -VAL |
1 45 45 45 -NODE|
1 45 45 45 =EOL |\x0a
2 0 46 46 -PAIR|
2 0 46 46 +PAIR|
2 0 46 46 =SYNX|?
2 1 47 47 +NODE|
2 1 47 47 +VAL |
2 1 47 47 -VAL |
2 1 47 47 -NODE|
2 1 47 47 =REST|foo:.safe.question.mark
2 24 70 70 =REST|\x0a
3 0 71 71 =SYNX|:
3 1 72 72 +NODE|
3 1 72 72 +VAL |
3 1 72 72 -VAL |
3 1 72 72 -NODE|
3 1 72 72 =REST|foo:.safe.colon
3 16 87 87 =REST|\x0a
4 0 88 88 -PAIR|
4 0 88 88 +PAIR|
4 0 88 88 +NODE|
4 0 88 88 +VAL |
4 0 88 88 =TEXT|-foo
4 4 92 92 -VAL |
4 4 92 92 -NODE|
4 4 92 92 =SYNX|:
4 5 93 93 =WSPC|.
4 6 94 94 +NODE|
4 6 94 94 +VAL |
4 6 94 94 =TEXT|safe.dash
4 15 103 103 -VAL |
4 15 103 103 -NODE|
4 15 103 103 =EOL |\x0a
5 0 104 104 -PAIR|
5 0 104 104 +PAIR|
5 0 104 104 +NODE|
5 0 104 104 +VAL |
5 0 104 104 =TEXT|this.is#not
5 11 115 115 -VAL |
5 11 115 115 -NODE|
5 11 115 115 =SYNX|:
5 12 116 116 =WSPC|.
5 13 117 117 +NODE|
5 13 117 117 +VAL |
5 13 117 117 =TEXT|a.comment
5 22 126 126 -VAL |
5 22 126 126 -NODE|
5 22 126 126 =EOL |\x0a
6 0 127 127 -PAIR|
6 0 127 127 -MAP |
6 0 127 127 -NODE|
6 0 127 127 -DOC |
na
{
'-foo' => 'safe dash',
':foo' => 'safe colon',
'?foo' => 'safe question mark',
'a!"#$%&\'()*+,-./09:;<=>?@AZ[\\]^_`az{|}~' => 'safe',
'this is#not' => 'a comment'
}
na
{
'-foo' => 'safe dash',
':foo' => 'safe colon',
'?foo' => 'safe question mark',
'a!"#$%&\'()*+,-./09:;<=>?@AZ[\\]^_`az{|}~' => 'safe',
'this is#not' => 'a comment'
}
na
{
'-foo' => 'safe dash',
':foo' => 'safe colon',
'?foo' => 'safe question mark',
'a!"#$%&\'()*+,-./09:;<=>?@AZ[\\]^_`az{|}~' => 'safe',
'this is#not' => 'a comment'
}
na
{
'-foo' => 'safe dash',
':foo' => 'safe colon',
'?foo' => 'safe question mark',
'a!"#$%&\'()*+,-./09:;<=>?@AZ[\\]^_`az{|}~' => 'safe',
'this is#not' => 'a comment'
}
na
{'-foo': 'safe dash',
':foo': 'safe colon',
'?foo': 'safe question mark',
'a!"#$%&\'()*+,-./09:;<=>?@AZ[\\]^_`az{|}~': 'safe',
'this is#not': 'a comment'}
na
{'-foo': 'safe dash',
':foo': 'safe colon',
'?foo': 'safe question mark',
'a!"#$%&\'()*+,-./09:;<=>?@AZ[\\]^_`az{|}~': 'safe',
'this is#not': 'a comment'}