Skip to content

Commit

Permalink
mochijson2 は忘れる
Browse files Browse the repository at this point in the history
  • Loading branch information
voluntas committed Nov 19, 2024
1 parent 98158fb commit 2585d11
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/jesse_lib.erl
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,12 @@ is_array(_) ->

%% @doc A naive check if the given data is a json object.
%% Supports two main formats of json representation:
%% 1) mochijson2 format (`{struct, proplist()}')
%% 2) jiffy format (`{proplist()}')
%% 3) jsx format (`[{binary() | atom(), any()}]')
%% 1) jiffy format (`{proplist()}')
%% 2) jsx format (`[{binary() | atom(), any()}]')
%% Returns `true' if the given data is an object, otherwise `false' is returned.
-spec is_json_object(Value :: any()) -> boolean().
is_json_object(Map) when is_map(Map) ->
true;
is_json_object({struct, Value}) when is_list(Value) ->
true;
is_json_object({Value}) when is_list(Value) ->
true;
%% handle `jsx' empty objects
Expand Down

0 comments on commit 2585d11

Please sign in to comment.