Deserialising nested Json into java object through Java -clinet

Santi Kumar santi at
Tue Apr 7 13:41:41 EDT 2015

Thanks Brian for the response. Yah we r trying to write that Jackson
deserialiser  for our object and was struck there as we r not much familiar
just want to check if there is a direct way. We will either try to share
with you or try solr client directly

 On Apr 7, 2015 9:37 PM, "Brian Roach" <roach at> wrote:

> Santi,
> There is nothing in the Riak Java client to do that, no.
> The result of a search query over the Riak protocol buffers API
> returns the fields you queried for as a series of key/value pairs,
> with the value always being a string. This is unfortunate when it
> comes to mapping those values back to a class (or just serializing
> them to JSON) if there was any non-string values (numbers or null).
> The Java client presents a returned document as a Map<String,
> List<String>> for this reason, the list being required as there could
> be multiple values for a single key.
> That said, it shouldn't be too difficult to write a custom
> deserializer for Jackson if you know what the results are going to
> look like in advance. If you could show a dump of the Map being
> returned by the Riak client we may be able to help with that. Another
> option would be to use a Solr client and query Solr directly rather
> than going through Riak.
> Thanks,
> Brian Roach
> On Tue, Apr 7, 2015 at 8:32 AM, Santi Kumar <santi at> wrote:
> > Hi
> > We have a Composite pojo which we are indexing into Riak search. If I see
> > the structure of the object in solr web console, it shows as nested json.
> > Through java client when we query it returns the Map and having
> difficulties
> > in converting it into java object. Is there a way in riak-java client to
> > return a pojo instead of Map and we dealing with jakson mappers?
> >
> > Thanks
> > Santi
> >
> > _______________________________________________
> > riak-users mailing list
> > riak-users at
> >
> >
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the riak-users mailing list