It works fine until I attempt to escape {
, or any escape sequence not listed here: go/scanner.go at master · golang/go · GitHub
Escaping {
does not work on your linked validator, but it does work on https://jsonformatter.curiousconcept.com/.
It even works in chrome console, try this example there: {"a": "b\{c"}
.
So why is go (and your link) now allowing it?
edit: i got it to work with help from irc user fizzie on freenode #go-nuts by doing this: "report-to": [ "\\\u007btest}" ]
edit2: in the end this is what my report-to header looks like in the json config:
"report-to": [ "\\\u007b \u0022group\u0022: \u0022csp\u0022, \u0022includeSubdomains\u0022: true, \u0022max_age\u0022: 86400, \u0022endpoints\u0022: [ \\\u007b \u0022url\u0022: \u0022https://example.com/csp\u0022, \u0022priority\u0022: 100, \u0022weight\u0022: 100 \\\u007d ] \\\u007d" ]
I realize i over-escaped a bit, but my syntax highlighter was giving me sass, so I just escaped everything.