anchor.diff:                   end
       end.
   
  -%%%===================================================================
  -%%% Internal functions
  -%%%===================================================================
   
  -%%--------------------------------------------------------------------
  -%% @private 
  -%% @doc Test if list is a proplist.
  -%% @end
  -%%--------------------------------------------------------------------
  +%% @private
  +-spec is_proplist(term()) -> boolean().
   is_proplist([]) -> true;
   is_proplist([{_,_}|L]) -> is_proplist(L);
   is_proplist(_) -> false.
  
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: -module(json_utils).
  -author("Tomasz Lichon").
  
  % Representation of any valid JSON term in erlang
  -type json_term() :: jiffy:json_value().
  -export_type([json_term/0]).
  
  %% API
  -export([encode/1, encode/2, decode/1, decode/2]).
  -export([encode_deprecated/1, decode_deprecated/1]).
  -export([map_to_list/1, list_to_map/1]).
  
  