# 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-yamlcpp-event

 ok

dotnet-yamldotnet-event

 ok

hs-hsyaml-event

 ok

js-yaml-event

 ok

nim-nimyaml-event

 ok

perl-pp-event

 ok

perl-pplibyaml-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"
}

java-snakeyaml-event

 error
Exception in thread "main" while scanning a double-quoted scalar
 in 'reader', line 1, column 16:
    escaped slash: "a\/b"
                   ^
found unknown escape character /(47)
 in 'reader', line 1, column 19:
    escaped slash: "a\/b"
                      ^

	at org.yaml.snakeyaml.scanner.ScannerImpl.scanFlowScalarNonSpaces(ScannerImpl.java:1965)
	at org.yaml.snakeyaml.scanner.ScannerImpl.scanFlowScalar(ScannerImpl.java:1901)
	at org.yaml.snakeyaml.scanner.ScannerImpl.fetchFlowScalar(ScannerImpl.java:1048)
	at org.yaml.snakeyaml.scanner.ScannerImpl.fetchDouble(ScannerImpl.java:1030)
	at org.yaml.snakeyaml.scanner.ScannerImpl.fetchMoreTokens(ScannerImpl.java:415)
	at org.yaml.snakeyaml.scanner.ScannerImpl.checkToken(ScannerImpl.java:248)
	at org.yaml.snakeyaml.parser.ParserImpl$ParseBlockMappingValue.produce(ParserImpl.java:665)
	at org.yaml.snakeyaml.parser.ParserImpl.peekEvent(ParserImpl.java:165)
	at org.yaml.snakeyaml.Yaml$3.hasNext(Yaml.java:677)
	at org.yaml.editor.Snake2Events.yamlToEvents(Snake2Events.java:111)
	at org.yaml.editor.Snake2Events.main(Snake2Events.java:119)

java-snakeyaml-json

 error
Exception in thread "main" while scanning a double-quoted scalar
 in 'reader', line 1, column 16:
    escaped slash: "a\/b"
                   ^
found unknown escape character /(47)
 in 'reader', line 1, column 19:
    escaped slash: "a\/b"
                      ^

	at org.yaml.snakeyaml.scanner.ScannerImpl.scanFlowScalarNonSpaces(ScannerImpl.java:1965)
	at org.yaml.snakeyaml.scanner.ScannerImpl.scanFlowScalar(ScannerImpl.java:1901)
	at org.yaml.snakeyaml.scanner.ScannerImpl.fetchFlowScalar(ScannerImpl.java:1048)
	at org.yaml.snakeyaml.scanner.ScannerImpl.fetchDouble(ScannerImpl.java:1030)
	at org.yaml.snakeyaml.scanner.ScannerImpl.fetchMoreTokens(ScannerImpl.java:415)
	at org.yaml.snakeyaml.scanner.ScannerImpl.checkToken(ScannerImpl.java:248)
	at org.yaml.snakeyaml.parser.ParserImpl$ParseBlockMappingValue.produce(ParserImpl.java:665)
	at org.yaml.snakeyaml.parser.ParserImpl.peekEvent(ParserImpl.java:165)
	at org.yaml.snakeyaml.comments.CommentEventsCollector$1.peek(CommentEventsCollector.java:59)
	at org.yaml.snakeyaml.comments.CommentEventsCollector$1.peek(CommentEventsCollector.java:45)
	at org.yaml.snakeyaml.comments.CommentEventsCollector.collectEvents(CommentEventsCollector.java:140)
	at org.yaml.snakeyaml.comments.CommentEventsCollector.collectEvents(CommentEventsCollector.java:119)
	at org.yaml.snakeyaml.composer.Composer.composeScalarNode(Composer.java:214)
	at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:184)
	at org.yaml.snakeyaml.composer.Composer.composeKeyNode(Composer.java:310)
	at org.yaml.snakeyaml.composer.Composer.composeMappingChildren(Composer.java:301)
	at org.yaml.snakeyaml.composer.Composer.composeMappingNode(Composer.java:286)
	at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:188)
	at org.yaml.snakeyaml.composer.Composer.getNode(Composer.java:115)
	at org.yaml.snakeyaml.constructor.BaseConstructor.getData(BaseConstructor.java:135)
	at org.yaml.snakeyaml.Yaml$1.next(Yaml.java:514)
	at org.yaml.editor.Snake2Json.yamlToJson(Snake2Json.java:18)
	at org.yaml.editor.Snake2Json.main(Snake2Json.java:25)

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'}