Error parsing an optional JSON escape of a forward slash

Issue #405 wontfix
created an issue

The stack below is based on an older version of snakeyaml but it objects to a valid json string notably coming from and org.json.JSONObject (some file contents redacted):

FATAL ERROR: while scanning a double-quoted scalar
 in 'string', line 1, column 3958:
     ... :"lalala","command":"foo ... 
found unknown escape character /(47)
 in 'string', line 1, column 4037:
     ... ace.log 2\u003e/dev/null \u003c\/dev/null\u0026,","build_flags_b ... 

    at org.yaml.snakeyaml.scanner.ScannerImpl.scanFlowScalarNonSpaces(
    at org.yaml.snakeyaml.scanner.ScannerImpl.scanFlowScalar(
    at org.yaml.snakeyaml.scanner.ScannerImpl.fetchFlowScalar(
    at org.yaml.snakeyaml.scanner.ScannerImpl.fetchDouble(

From the source, it doesn't look like this is addressed at HEAD. AIUI forward slash is not called out in YAML 1.1 standard (which is oddly listed as current?), but is specifically added in 1.2 "for JSON compatibility"

Comments (4)

  1. dthkao reporter

    Aha! Thanks! Just out of curiosity was there a rationale behind pinning support to 1.1 and branching a separate project for 1.2?

  2. Log in to comment