What is the best way to convert to/from Jackson JSON representation

We do have client Java code that is processing REST API response and producing an instance of com.fasterxml.jackson.databind.JsonNode
In most of the cases it is ObjectNode with some ArrayNode occurrences.
Couchbase stores its JsonDocuments with the content as com.couchbase.client.java.document.json.JsonObject or JsonArray.
I presume that they are very similar, but do not see in the documentation any conversion to/from Jackson.
Is there are quick and easy way to do so, other than RawJsonObject.
I am planning to do some N1QL querying.

As you mentioned RawJsonDocument is the easiest way but not efficient. You can add a custom transcoder to convert JsonNode to bytes and decode from bytes. Here is a sample written by @daschl which takes byte array https://gist.github.com/daschl/a42fa84ac7b01e627c3a40299d9f93cd

However for N1QL, the sdk provides the byte array, so you can convert to JsonNode directly

JsonNode jsonNode = mapper.readTree(result.rows().next().byteValue());