add control_codes mode to strict parsing that rejects strings with

ascii control codes
This commit is contained in:
alisdair 2017-12-23 19:08:28 -08:00
parent 6a01f3a43b
commit e5bfa8a39e
4 changed files with 25 additions and 71 deletions

View file

@ -439,8 +439,12 @@ additional options beyond these. see
escape sequences not adhering to the json spec result in a `badarg` error
* `control_codes`
control codes in strings result in `badarg` errors
any combination of these can be passed to **jsx** by using `{strict, [strict_option()]}`.
`strict` is equivalent to `{strict, [comments, trailing_commas, utf8, single_quotes, escapes]}`
`strict` is equivalent to `{strict, [comments, trailing_commas, utf8, single_quotes, escapes, control_codes]}`
- `return_tail`