anchor.diff:          end                   
       end.
   
  +
   %%--------------------------------------------------------------------
   %% @doc
  -%% Convenience function that converts erlang proplist to erlang map.
  +%% Converts a nested proplist to a map.
   %% @end
   %%--------------------------------------------------------------------
  +-spec list_to_map(proplists:proplist()) -> maps:map().
   list_to_map({Key, []}) ->
           {Key, []};
   
  
positive.code:     try map_to_list(jiffy:decode(JSON, [return_maps])) 
      catch _:_ -> throw(invalid_json) end.
  
  %%--------------------------------------------------------------------
  %% @doc
  %% Convenience function that converts erlang map to erlang list.
  %% @end
  %%--------------------------------------------------------------------
  -spec map_to_list(maps:map()) -> proplists:proplist().
  
negative.code: 
  %%--------------------------------------------------------------------
  %% @doc
  %% @equiv encode(JsonTerm, [])
  %% @end
  %%--------------------------------------------------------------------
  -spec encode(json_term()) -> binary().
  encode(JsonTerm) ->
      encode(JsonTerm, []).
  
  
  %%--------------------------------------------------------------------
  %% @doc
  %% Converts an erlang representation of JSON term to a binary JSON.
  %% Objects are represented as maps. The output is in UTF8 encoding.
  %% @end
  %%--------------------------------------------------------------------
  -spec encode(json_term(), JiffyOpts :: list()) -> binary().
  encode(Map, JiffyOpts) ->
      iolist_to_binary(jiffy:encode(Map, JiffyOpts)).
  
  
  %%--------------------------------------------------------------------
  %% @doc
  %% @equiv decode(JSON, [])
  %% @end
  %%--------------------------------------------------------------------
  -spec decode(binary()) -> json_term().
  decode(JSON) ->
      decode(JSON, []).
  
  
  %%--------------------------------------------------------------------
  %% @doc
  %% Converts a binary JSON to an erlang representation of JSON term.
  %% Objects are represented as maps. The output is in UTF8 encoding.
  %% @end
  %%--------------------------------------------------------------------
  -spec decode(binary(), JiffyOpts :: list()) -> json_term().
  decode(<<"">>, _) -> maps:new();
  decode(JSON, JiffyOpts) ->
      try
          jiffy:decode(JSON, [return_maps | JiffyOpts])
      catch _:_ ->
          throw(invalid_json)
      end.
  
  
  %%--------------------------------------------------------------------
  %% @doc
  %% DEPRECATED
  %% Converts an erlang representation of JSON term to a binary JSON.
  %% Objects are represented as proplists. The output is in UTF8 encoding.
  %% @end
  %%--------------------------------------------------------------------
  -spec encode_deprecated(term()) -> binary().
  encode_deprecated(Term) ->
      iolist_to_binary(jiffy:encode(list_to_map(Term))).
  
  
  %%--------------------------------------------------------------------
  %% @doc
  %% DEPRECATED
  %% Converts a binary JSON to an erlang representation of JSON term.
  %% Objects are represented as proplists. The output is in UTF8 encoding.
  %% @end
  %%--------------------------------------------------------------------
  -spec decode_deprecated(binary()) -> proplists:proplist().
  