DESCRIPTION

JCBC-1063: Never compress JSON in LegacyDocument.

Motivation
----------
In spymemcached, the code checks if the string is JSON
and if it is it skips compression so the server can
understand it properly.

Modifications
-------------
Up until now the LegacyTranscoder didn't check for this
fact and as a result did compress larger JSON docs which
would then not be readable by the server properly.

This changeset ports the (not bulletproof) JSON check from
spymemcached and adds a test case to make sure that JSON is
indeed not compressed even if larger than the compression
threshold.

Result
------
better compatibility with spymemcache and making sure that
larger JSON docs are not compressed.

Change-Id: I00307701caf577d91cb7d351207c6c26897ee284
Reviewed-on: http://review.couchbase.org/75779
Reviewed-by: Marques Ellis xxx@xxx.xxx
Reviewed-by: Natasha Sullivan xxx@xxx.xxx
Tested-by: Natasha Sullivan xxx@xxx.xxx


COMMENTS

author: Natasha Sullivan
date: 2017-03-28 07:07:03.389000000

Change has been successfully cherry-picked as 1d63bc1da9758ddeef817190985918136c12365b by Natasha Sullivan

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