Package thrift.test

Examples of thrift.test.GuessProtocolStruct


    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);
  }
View Full Code Here

TOP

Related Classes of thrift.test.GuessProtocolStruct

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.