move opts handling to jsx.erl for earlier failure on badopts
This commit is contained in:
parent
3fdf2b28c8
commit
4a078bd44a
5 changed files with 63 additions and 78 deletions
|
@ -22,6 +22,16 @@
|
|||
|
||||
|
||||
|
||||
%% opts record for decoder/encoder
|
||||
-record(opts, {
|
||||
loose_unicode = false,
|
||||
encoding = auto,
|
||||
escape_forward_slash = false, %% does nothing, used by encoder
|
||||
iterate = false
|
||||
}).
|
||||
|
||||
|
||||
|
||||
-define(is_utf_encoding(X),
|
||||
X == utf8
|
||||
; X == utf16
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue