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
|
@ -48,17 +48,6 @@ parse(JSON, Opts) ->
|
|||
%% anyways, they are horrible and contrary to the spec
|
||||
|
||||
|
||||
%% 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).
|
||||
|
||||
|
||||
start(<<S/?encoding, Rest/binary>>, Stack, Opts) when ?is_whitespace(S) ->
|
||||
start(Rest, Stack, Opts);
|
||||
start(<<?start_object/?encoding, Rest/binary>>, Stack, Opts) ->
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue