anchor.diff:  %% update a document the attributes list must contain a '_rev' key/value
   %% pair tuple.
   %% @todo Create a spec for this.
  -update_document({Server, ServerPort}, Database, DocID, {struct,_} = Obj) when is_list(Server), is_integer(ServerPort) ->
  -    Url = build_uri(Database, DocID),
  -    JSON = list_to_binary(mochijson2:encode(Obj)),
  -    raw_request("PUT", Server, ServerPort, Url, JSON);
   update_document({Server, ServerPort}, Database, DocID, Attributes) when is_list(Server), is_integer(ServerPort) ->
       Url = build_uri(Database, DocID),
  -    JSON = list_to_binary(mochijson2:encode({struct, Attributes})),
  +    JSON = list_to_binary(engejson:encode(Attributes)),
       raw_request("PUT", Server, ServerPort, Url, JSON).
   
   %% @doc Deletes a given document by id and revision.
  
positive.code: 
  %% @private
  %% @doc Return an empty object
  empty() -> {struct, []}.
  
  %% @private
  %% @doc Extend a json obj with one or more json obj (add new leaves and modify the existing ones).
  
negative.code: %% @doc Delete a bunch of documents with a _bulk_docs request.
  delete_documents({Server, ServerPort}, Database, Documents) when is_list(Server), is_integer(ServerPort) ->
      Url = build_uri(Database, "_bulk_docs"),
      BulkDelete = [
          {<<"docs">>, [
              [{<<"_id">>, Id}, {<<"_rev">>, Rev}, {<<"_deleted">>, true}] || {Id, Rev} <- Documents
          ]}
      ],
      JSON = list_to_binary(engejson:encode(BulkDelete)),
      raw_request("POST", Server, ServerPort, Url, JSON).
  
  %% @doc Creates a design document. See create_view/6 for more.
  