# YAML Test Matrix

--- &test-3UYS
  Title: Escaped slash in double quotes
  Tags: [ double ]

YAML

escaped slash: "a\/b"

Expected Events

+STR
+DOC
+MAP
=VAL :escaped slash
=VAL "a/b
-MAP
-DOC
-STR

Expected JSON

{
"escaped slash": "a/b"
}

c-libfyaml-event

 ok

c-libyaml-event

 ok

cpp-rapidyaml-event

 ok

cpp-yamlcpp-event

 ok

dotnet-yamldotnet-event

 ok

hs-hsyaml-event

 ok

js-yaml-event

 ok

nim-nimyaml-event

 ok

perl-pp-event

 ok

perl-refparser-event

 ok

py-pyyaml-event

 ok

py-ruamel-event

 ok

c-libfyaml-json

 json_ok

dotnet-yamldotnet-json

 json_ok

hs-hsyaml-json

 json_ok

js-jsyaml-json

 json_ok

js-yaml-json

 json_ok

lua-lyaml-json

 json_ok

perl-pp-json

 json_ok

perl-pplibyaml-json

 json_ok

perl-xs-json

 json_ok

py-pyyaml-json

 json_ok

py-ruamel-json

 json_ok

ruby-psych-json

 json_ok

perl-syck-json

 json_diff
{
  "escaped slash": "a\\/b"
}

perl-tiny-json

 json_diff
{
  "escaped slash": "a\\/b"
}

perl-yaml-json

 json_diff
{
  "escaped slash": "a\\/b"
}

go-yaml-json

 error
yaml: found unknown escape character

rust-yamlrust-event

 error
+STR
+DOC
+MAP
=VAL :escaped slash
Error: ScanError { mark: Marker { index: 15, line: 1, col: 15 }, info: "while parsing a quoted scalar, found unknown escape character" }

hs-reference-yeast

 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|escaped.slash
   1   13   13   13 -VAL |
   1   13   13   13 -NODE|
   1   13   13   13 =SYNX|:
   1   14   14   14 =WSPC|.
   1   15   15   15 +NODE|
   1   15   15   15 +VAL |
   1   15   15   15 =SYNX|"
   1   16   16   16 =TEXT|a
   1   17   17   17 +ESC |
   1   17   17   17 =SYNX|\x5c
   1   18   18   18 =META|/
   1   19   19   19 -ESC |
   1   19   19   19 =TEXT|b
   1   20   20   20 =SYNX|"
   1   21   21   21 -VAL |
   1   21   21   21 -NODE|
   1   21   21   21 =EOL |\x0a
   2    0   22   22 -PAIR|
   2    0   22   22 -MAP |
   2    0   22   22 -NODE|
   2    0   22   22 -DOC |

perl-pp-perl

 na
{
  'escaped slash' => 'a/b'
}

perl-pplibyaml-perl

 na
{
  'escaped slash' => 'a/b'
}

perl-syck-perl

 na
{
  'escaped slash' => 'a\\/b'
}

perl-tiny-perl

 na
{
  'escaped slash' => 'a\\/b'
}

perl-xs-perl

 na
{
  'escaped slash' => 'a/b'
}

perl-yaml-perl

 na
{
  'escaped slash' => 'a\\/b'
}

py-pyyaml-py

 na
{'escaped slash': 'a/b'}

py-ruamel-py

 na
{'escaped slash': 'a/b'}