@Test
public void encode() throws NoSuchFieldException, IllegalAccessException, IOException, SQLException {

    //get the jackson mapper
    java.lang.reflect.Field reflectField = parser.getClass().getDeclaredField("MAPPER");
    reflectField.setAccessible(true);
    ObjectMapper mapper = (ObjectMapper)reflectField.get(null);
    //bigint type
    Field field = new Field("bigint_type", JDBCType.BIGINT.getVendorTypeNumber(), new Long(9223372036854775807L));
    byte[] bytes = mapper.writeValueAsBytes(field);
    Field sameField = mapper.readValue(bytes, Field.class);
    Assertions.assertTrue(DataCompareUtils.isFieldEquals(field, sameField).getResult());
    //big decimal type
    field = new Field("decimal_type", JDBCType.DECIMAL.getVendorTypeNumber(), new BigDecimal("55555555555555555555.55555555555555555555"));
    bytes = mapper.writeValueAsBytes(field);
    sameField = mapper.readValue(bytes, Field.class);
    Assertions.assertTrue(DataCompareUtils.isFieldEquals(field, sameField).getResult());
    //double type
    field = new Field("double_type", JDBCType.DOUBLE.getVendorTypeNumber(), 999999.999999999);
    bytes = mapper.writeValueAsBytes(field);
    sameField = mapper.readValue(bytes, Field.class);
    Assertions.assertTrue(DataCompareUtils.isFieldEquals(field, sameField).getResult());
    //timestamp type
    field = new Field("timestamp_type", JDBCType.TIMESTAMP.getVendorTypeNumber(), Timestamp.valueOf("2019-08-10 10:49:26.926554"));
    bytes = mapper.writeValueAsBytes(field);
    sameField = mapper.readValue(bytes, Field.class);
    Assertions.assertTrue(DataCompareUtils.isFieldEquals(field, sameField).getResult());
    //blob type
    field = new Field("blob_type", JDBCType.BLOB.getVendorTypeNumber(), new SerialBlob("hello".getBytes()));
    bytes = mapper.writeValueAsBytes(field);
    sameField = mapper.readValue(bytes, Field.class);
    Assertions.assertTrue(DataCompareUtils.isFieldEquals(field, sameField).getResult());
    //clob type
    field = new Field("clob_type", JDBCType.CLOB.getVendorTypeNumber(), new SerialClob("hello".toCharArray()));
    bytes = mapper.writeValueAsBytes(field);
    sameField = mapper.readValue(bytes, Field.class);
    Assertions.assertTrue(DataCompareUtils.isFieldEquals(field, sameField).getResult());
}