anchor.diff:      BinKey = list_to_binary(Key),
       ok = case riakc_pb_socket:get(Conn, Bucket, BinKey) of
           {ok, O} ->
  -            O2 = riakc_obj:update_value(O, PropList),
  +            O2 = riakc_obj:update_value(O, ConvertedPropList),
               riakc_pb_socket:put(Conn, O2);
           {error, _} ->
  -            O = riakc_obj:new(Bucket, BinKey, PropList, <<"application/x-erlang-term">>),
  +            O = riakc_obj:new(Bucket, BinKey, ConvertedPropList, <<"application/x-erlang-term">>),
               riakc_pb_socket:put(Conn, O)
       end,
       {ok, Record:set(id, lists:concat([Type, "-", Key]))}.
  
positive.code: find(Conn, Type, Conditions, Max, Skip, Sort, SortOrder) ->
      Bucket = type_to_bucket_name(Type),
      {ok, Keys} = case Conditions of
          [] -> 
              riakc_pb_socket:list_keys(Conn, Bucket);
          _ ->
              {ok, {search_results, KeysExt, _, _}} = riakc_pb_socket:search(
                  Conn, Bucket, build_search_query(Conditions)),
              {ok, lists:map(fun ([{_,X}])-> X end, KeysExt)}
      end,
      Records = find_acc(Conn, atom_to_list(Type) ++ "-", Keys, []),
      Sorted = if
  
negative.code: 
  escape_value([], Acc) ->
      lists:reverse(Acc);
  escape_value([H|T], Acc) when H=:=$+; H=:=$-; H=:=$&; H=:=$|; H=:=$!; H=:=$(; H=:=$);
                                H=:=$[; H=:=$]; H=:=${; H=:=$}; H=:=$^; H=:=$"; H=:=$~;
                                H=:=$*; H=:=$?; H=:=$:; H=:=$\\ ->
      escape_value(T, lists:reverse([$\\, H], Acc));
  escape_value([H|T], Acc) ->
      escape_value(T, [H|Acc]).
  
  encode_data_for_riak(Data) ->
      lists:map(fun({K, V}) ->
          BinaryKey = list_to_binary(atom_to_list(K)),
          ConvertedValue = try
                             list_to_binary(V)
                           catch
                             error:_ -> V
                           end,
          {BinaryKey, ConvertedValue}
      end, Data).
  
  decode_data_from_riak(Data) ->
      lists:map(fun({K, V}) ->
          BinaryKey = binary_to_atom(K, utf8),
          ConvertedValue = try
                             binary_to_list(V)
                           catch
                             error:_ -> V
                           end,
          {BinaryKey, ConvertedValue}
      end, Data).
  
  decode_search_from_riak(Data) ->
      lists:map(fun({K, V}) ->
          {K, decode_data_from_riak(V)}
      end, Data).
  