Java SearchResponse<ObjectNode> serialization

it's a simple question, but I can't seem to serialize the SearchResponse back to a json string.

What I've tried:

    final SearchResponse<ObjectNode> search1 =
            e -> e.index("myindex")

                                    qb -> qb.matchAll(ma -> ma)

    final JsonGenerator generator = Json.createGenerator(response.getWriter());
    search1.serialize(generator, new JacksonJsonpMapper(createDefaultObjectMapper()));

I get the non meaningful error:

java.lang.IllegalArgumentException: Jackson's ObjectMapper can only be used with the JacksonJsonpProvider

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.