drop support for versions before OTP-17 and bump to 3.0.0
This commit is contained in:
parent
1bbe8986c7
commit
fab436e1d5
14 changed files with 64 additions and 286 deletions
25
src/jsx.erl
25
src/jsx.erl
|
@ -29,7 +29,6 @@
|
|||
-export([consult/1, consult/2]).
|
||||
-export([encoder/3, decoder/3, parser/3]).
|
||||
-export([resume/3]).
|
||||
-export([maps_support/0]).
|
||||
|
||||
-export_type([json_term/0, json_text/0, token/0]).
|
||||
-export_type([encoder/0, decoder/0, parser/0, internal_state/0]).
|
||||
|
@ -42,18 +41,6 @@
|
|||
-export([init/1, handle_event/2]).
|
||||
-endif.
|
||||
|
||||
|
||||
-ifndef(maps_support).
|
||||
-type json_term() :: [{binary() | atom(), json_term()}] | [{},...]
|
||||
| [json_term()] | []
|
||||
| {with_tail, json_term(), binary()}
|
||||
| true | false | null
|
||||
| integer() | float()
|
||||
| binary() | atom()
|
||||
| calendar:datetime().
|
||||
-endif.
|
||||
|
||||
-ifdef(maps_support).
|
||||
-type json_term() :: [{binary() | atom(), json_term()}] | [{},...]
|
||||
| [json_term()] | []
|
||||
| {with_tail, json_term(), binary()}
|
||||
|
@ -62,7 +49,6 @@
|
|||
| integer() | float()
|
||||
| binary() | atom()
|
||||
| calendar:datetime().
|
||||
-endif.
|
||||
|
||||
-type json_text() :: binary().
|
||||
|
||||
|
@ -183,17 +169,6 @@ resume(Term, {decoder, State, Handler, Acc, Stack}, Config) ->
|
|||
resume(Term, {parser, State, Handler, Stack}, Config) ->
|
||||
jsx_parser:resume(Term, State, Handler, Stack, jsx_config:parse_config(Config)).
|
||||
|
||||
|
||||
-spec maps_support() -> boolean().
|
||||
|
||||
-ifndef(maps_support).
|
||||
maps_support() -> false.
|
||||
-endif.
|
||||
-ifdef(maps_support).
|
||||
maps_support() -> true.
|
||||
-endif.
|
||||
|
||||
|
||||
-ifdef(TEST).
|
||||
|
||||
-include_lib("eunit/include/eunit.hrl").
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue