anchor.diff:               ]).
   
   -type json_term() :: term().
  +-type error()     :: {error, term()}.
   
   %%% API
   %% @doc Adds a schema definition `Schema' to in-memory storage associated with
   %% a key `Key'. It will overwrite an existing schema with the same key if
   %% there is any.
  --spec add_schema(Key :: any(), Schema :: json_term()) -> ok.
  +-spec add_schema(Key :: any(), Schema :: json_term()) -> ok | error().
   add_schema(Key, Schema) ->
     ValidationFun = fun jesse_schema_validator:is_json_object/1,
     MakeKeyFun    = fun(_) -> Key end,
  
positive.code: -export([ add_schema/2
          , add_schema/3
          , del_schema/1
          , update_schema/2
          , update_schema/4
          , validate/2
          , validate/3
          , validate_with_schema/2
  
negative.code: %% to the caller, otherwise an error with an appropriate error reason
  %% is returned.
  -spec validate(Schema :: any(), Data :: json_term()) -> {ok, json_term()}
                                                        | error().
  validate(Schema, Data) ->
    try
      JsonSchema = jesse_database:read(Schema),
  