repaired jsx:fold and moved some defines to jsx_decoder.hrl
This commit is contained in:
parent
cff4d17561
commit
5309030233
4 changed files with 26 additions and 19 deletions
|
@ -83,6 +83,17 @@
|
|||
).
|
||||
|
||||
|
||||
%% two macros to simplify incomplete handling
|
||||
-define(incomplete(Valid, Incomplete, Finish),
|
||||
case Valid of
|
||||
true -> {error, badjson}
|
||||
; false -> {incomplete, Incomplete, Finish}
|
||||
end
|
||||
).
|
||||
|
||||
-define(ferror, fun() -> {error, badjson} end).
|
||||
|
||||
|
||||
%% compilation macros for unified decoder
|
||||
-ifdef(utf8).
|
||||
-define(encoding, utf8).
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue