diff --git a/README.md b/README.md index 37590e9..9f72709 100644 --- a/README.md +++ b/README.md @@ -440,7 +440,7 @@ additional options beyond these. see escape sequences not adhering to the json spec result in a `badarg` error any combination of these can be passed to **jsx** by using `{strict, [strict_option()]}`. - `strict` is equivalent to `{strict, [comments, bad_utf8, single_quotes, escapes]}` + `strict` is equivalent to `{strict, [comments, trailing_commas, utf8, single_quotes, escapes]}` - `return_tail` diff --git a/src/jsx_to_term.erl b/src/jsx_to_term.erl index e5a15d0..0b9a7a5 100644 --- a/src/jsx_to_term.erl +++ b/src/jsx_to_term.erl @@ -423,6 +423,10 @@ return_maps_test_() -> [{}], jsx:decode(<<"{}">>, []) )}, + {"an empty map", ?_assertEqual( + [{}], + jsx:decode(<<"{}">>, [{return_maps, false}]) + )}, {"a small map", ?_assertEqual( #{<<"awesome">> => true, <<"library">> => <<"jsx">>}, jsx:decode(<<"{\"library\": \"jsx\", \"awesome\": true}">>, [return_maps])