anchor.diff:                                          LinkRD, UserMeta);
                           error -> LinkRD
                       end,
  -            {Doc, encode_vclock_header(UserMetaRD, Ctx), Ctx};
  +            {encode_value(Doc), encode_vclock_header(UserMetaRD, Ctx), Ctx};
           multiple_choices ->
               throw({unexpected_code_path, ?MODULE, produce_doc_body, multiple_choices})
       end.
  
positive.code:     LinkMD = dict:store(?MD_LINKS, L, EncMD),
      UserMetaMD = dict:store(?MD_USERMETA, UserMeta, LinkMD),
      MDDoc = riak_object:update_metadata(VclockDoc, UserMetaMD),
      Doc = riak_object:update_value(MDDoc, wrq:req_body(RD)),
      Options = case wrq:get_qs_value(?Q_RETURNBODY, RD) of ?Q_TRUE -> [returnbody]; _ -> [] end,
      case C:put(Doc, Ctx#ctx.w, Ctx#ctx.dw, 60000, Options) of
          {error, precommit_fail} ->
  
negative.code:               lists:delete(BucketLink, string:tokens(Heads, ",")))
      end.
  
  %% @spec get_ctype(dict(), term()) -> string()
  %% @doc Work out the content type for this object - use the metadata if provided
  get_ctype(MD,V) ->
      case dict:find(?MD_CTYPE, MD) of
          {ok, Ctype} ->
              Ctype;
          error when is_binary(V) ->
              "application/octet-stream";
          error ->
              "application/x-erlang-binary"
      end.
  
  %% @spec encode_value(term()) -> binary()
  %% @doc Encode the object value as a binary - content type can be used
  %%      to decode
  encode_value(V) when is_binary(V) ->
      V;
  encode_value(V) ->
      term_to_binary(V).
      
  %% @spec accept_value(binary()) -> term()
  %% @doc Accept the object value as a binary - content type can be used
  %%      to decode
  accept_value("application/x-erlang-binary",V) ->
      binary_to_term(V);
  accept_value(_Ctype, V) ->
      V.
  
  any_to_list(V) when is_list(V) ->
      V;
  any_to_list(V) when is_atom(V) ->
  