assertTrue(factory instanceof TJSONProtocol.Factory);
// Make sure data serialized with TCompact and which starts with '{'
// is not mistakenly guessed as serialized with JSON.
GuessProtocolStruct s = new GuessProtocolStruct();
s.putToMap_field("}","}");
byte[] ser = new TSerializer(new TCompactProtocol.Factory()).serialize(s);
factory = TProtocolUtil.guessProtocolFactory(ser, new TCompactProtocol.Factory());
assertFalse(factory instanceof TJSONProtocol.Factory);
}