Custom Object Mapper settings in Java Client

Cosmin Marginean cos.marginean at gmail.com
Mon Feb 22 07:04:00 EST 2016


Thank you, Vitaly, will give that a go.

On Mon, Feb 22, 2016 at 9:54 AM, Vitaly E <13vitamins at gmail.com> wrote:

> Hi Cosmin,
>
> Have a look at com.basho.riak.client.api.convert.ConverterFactory. It's a
> singleton, you can register a custom converter there (the default for
> classes other than String and RiakObject is
> com.basho.riak.client.api.convert.JSONConverter).
>
> It's also possible to pass a custom converter to the FetchValue API, for
> instance via
> com.basho.riak.client.api.commands.kv.KvResponseBase.getValues(com.basho.riak.client.api.convert.Converter<T>).
>
> I think this is the right way to add custom serialization.
>
> Regards,
> Vitaly
>
> On Mon, Feb 22, 2016 at 11:29 AM, Cosmin Marginean <
> cos.marginean at gmail.com> wrote:
>
>> Hi
>>
>> I presume that Riak Java client is using Jackson for JSON-to-POJO and
>> vice versa.
>>
>> Is there a way to easily inject a custom object mapper there? Or at least
>> to get a reference to it in order to add custom serializers?
>>
>> Thank you
>> Cosmin
>>
>> _______________________________________________
>> riak-users mailing list
>> riak-users at lists.basho.com
>> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.basho.com/pipermail/riak-users_lists.basho.com/attachments/20160222/f98c1308/attachment-0002.html>


More information about the riak-users mailing list