NHacker Next
  • new
  • past
  • show
  • ask
  • show
  • jobs
  • submit
Just say no to broken JSON (lemire.me)
chrisjj 16 hours ago [-]
> {"key": "value\nda"}

> My convention is that \n is the one-byte ASCII control character linefeed. This JSON is not valid.

How is this not valid?

rurban 15 hours ago [-]
Daniel seems to be pretty confused on this one. All examples produce the correct error response.
orangecat 15 hours ago [-]
That confused me too, apparently it needs to be "\\n".
chrisjj 1 hours ago [-]
/He/ may need it to be //n, but JSON does not. It is valid. https://jsonlint.com/ confirms.
Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact
Rendered at 10:31:12 GMT+0000 (UTC) with Wasmer Edge.