move opts handling to jsx.erl for earlier failure on badopts

This commit is contained in:
alisdair sullivan 2011-08-10 01:28:25 -07:00
parent 3fdf2b28c8
commit 4a078bd44a
5 changed files with 63 additions and 78 deletions

View file

@ -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