DESCRIPTION

JCBC-995: Improve customization of subdoc serialization

Motivation:
-----------
Subdocument uses the shaded Jackson MAPPER as its default implementation
for serialization and deserialization.

The FragmentTranscoder can be customized, and this is especially useful
on the write path, but the implementation can be a bit tricky.
In order to support custom serialization, a better abstract class would
be useful.

Additionally, the read path is more complex especially when multiple
operations are performed, as the LookupSpec is lost and as such there
is no way for the client to provide a target Class that can be natively
used for the deserialization.

In order to support custom deserialization, the raw bytes should be
exposed so the user can work with its own deserialization mechanism.

Modifications:
--------------
Added an optional rawContent getter on SubdocOperationResult.

Added an includeRaw option to the LookupInBuilders that will opt-in into
putting a copy of the raw JSON bytes into the result for GETs. This is
opt-in due to the sometimes undesirable memory overhead this implies.

Added a new abstract FragmentTranscoder that deals with byte arrays
instead of ByteBuf, making it easier to implement a concrete transcoder.

Results:
--------
Custom transcoders for subdoc can be written more easily and custom
deserialization can also be applied using the rawContent value.

Change-Id: I6131fb0bee7230c60e92892b818876115406488e


COMMENTS

author: Estrella Humphrey
date: 2016-08-18 14:18:04.839000000

Uploaded patch set 1.

-------------------------------------
author: Estrella Humphrey
date: 2016-08-18 14:18:17.457000000

Patch Set 1: Verified+1

-------------------------------------
author: Natasha Sullivan
date: 2016-08-24 14:36:43.069000000

Patch Set 1: Code-Review+2

-------------------------------------
author: Tate Garrett
date: 2016-08-24 14:46:47.972000000

Change has been successfully cherry-picked as 5ce047cf9af0582cc0539fce19b009f72df4163c by Estrella Humphrey

-------------------------------------
