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


COMMENTS

author: Natasha Sullivan
date: 2017-03-28 07:06:55.608000000

Patch Set 2: Patch Set 1 was rebased

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

Patch Set 2: Code-Review+2 Verified+1

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