package com.alibaba.json.bvt.issue_3000;

import com.alibaba.fastjson.JSON;
import junit.framework.TestCase;

public class Issue3031 extends TestCase {
    public void test_for_issue() throws Exception {
        String str = "{\"success\":true,\"message\":null,\"data\":[{\"tblId\":78,\"partId\":104,\"values\":[\"p001\",\"q001\"],\"dbName\":\"db001\",\"tableName\":\"tbl001\",\"createTime\":1582293531,\"lastAccessTime\":1,\"sd\":{\"sdId\":182,\"cdId\":181,\"cols\":[{\"name\":\"col1\",\"type\":\"string\",\"comment\":null},{\"name\":\"col2\",\"type\":\"int\",\"comment\":\"col2\"},{\"name\":\"col3\",\"type\":\"boolean\",\"comment\":null}],\"location\":\"oss://temp/jianghu/db001/tbl001\",\"inputFormat\":\"org.apache.hadoop.hive.ql.io.parquet.MapredParquetInputFormat\",\"outputFormat\":\"org.apache.hadoop.hive.ql.io.parquet.MapredParquetOutputFormat\",\"compressed\":true,\"numBuckets\":2,\"serdeInfo\":{\"serdeId\":182,\"name\":null,\"serializationLib\":\"org.apache.hadoop.hive.ql.io.parquet.serde.ParquetHiveSerDe\",\"parameters\":{\"field.delim\":\"\\t\",\"serialization.format\":\"\\t\"}},\"bucketCols\":[\"col1\"],\"sortCols\":[{\"col\":\"col1\",\"order\":0}],\"parameters\":{},\"skewedInfo\":{\"skewedColNames\":[\"col1\",\"col3\"],\"skewedColValues\":[[\"2\",\"1\"],[\"3\",\"2\"]],\"skewedColValueLocationMaps\":{}},\"storedAsSubDirectories\":false},\"parameters\":{\"totalSize\":\"0\",\"numRows\":\"-1\",\"rawDataSize\":\"-1\",\"COLUMN_STATS_ACCURATE\":\"false\",\"numFiles\":\"0\",\"transient_lastDdlTime\":\"1582293531\"},\"parametersSize\":6},{\"tblId\":78,\"partId\":105,\"values\":[\"p001\",\"q002\"],\"dbName\":\"db001\",\"tableName\":\"tbl001\",\"createTime\":1582293531,\"lastAccessTime\":1,\"sd\":{\"sdId\":183,\"cdId\":181,\"cols\":[{\"name\":\"col1\",\"type\":\"string\",\"comment\":null},{\"name\":\"col2\",\"type\":\"int\",\"comment\":\"col2\"},{\"name\":\"col3\",\"type\":\"boolean\",\"comment\":null}],\"location\":\"oss://temp/jianghu/db001/tbl001\",\"inputFormat\":\"org.apache.hadoop.hive.ql.io.parquet.MapredParquetInputFormat\",\"outputFormat\":\"org.apache.hadoop.hive.ql.io.parquet.MapredParquetOutputFormat\",\"compressed\":true,\"numBuckets\":2,\"serdeInfo\":{\"serdeId\":183,\"name\":null,\"serializationLib\":\"org.apache.hadoop.hive.ql.io.parquet.serde.ParquetHiveSerDe\",\"parameters\":{\"field.delim\":\"\\t\",\"serialization.format\":\"\\t\"}},\"bucketCols\":[\"col1\"],\"sortCols\":[{\"col\":\"col1\",\"order\":0}],\"parameters\":{},\"skewedInfo\":{\"skewedColNames\":[\"col1\",\"col3\"],\"skewedColValues\":[[\"2\",\"1\"],[\"3\",\"2\"]],\"skewedColValueLocationMaps\":{}},\"storedAsSubDirectories\":false},\"parameters\":{\"totalSize\":\"0\",\"numRows\":\"-1\",\"rawDataSize\":\"-1\",\"COLUMN_STATS_ACCURATE\":\"false\",\"numFiles\":\"0\",\"transient_lastDdlTime\":\"1582293531\",\"$ref\":\"$[0].parameters\"},\"parametersSize\":7},{\"tblId\":78,\"partId\":106,\"values\":[\"p002\",\"q002\"],\"dbName\":\"db001\",\"tableName\":\"tbl001\",\"createTime\":1582293531,\"lastAccessTime\":1,\"sd\":{\"sdId\":184,\"cdId\":181,\"cols\":[{\"name\":\"col1\",\"type\":\"string\",\"comment\":null},{\"name\":\"col2\",\"type\":\"int\",\"comment\":\"col2\"},{\"name\":\"col3\",\"type\":\"boolean\",\"comment\":null}],\"location\":\"oss://temp/jianghu/db001/tbl001\",\"inputFormat\":\"org.apache.hadoop.hive.ql.io.parquet.MapredParquetInputFormat\",\"outputFormat\":\"org.apache.hadoop.hive.ql.io.parquet.MapredParquetOutputFormat\",\"compressed\":true,\"numBuckets\":2,\"serdeInfo\":{\"serdeId\":184,\"name\":null,\"serializationLib\":\"org.apache.hadoop.hive.ql.io.parquet.serde.ParquetHiveSerDe\",\"parameters\":{\"field.delim\":\"\\t\",\"serialization.format\":\"\\t\"}},\"bucketCols\":[\"col1\"],\"sortCols\":[{\"col\":\"col1\",\"order\":0}],\"parameters\":{},\"skewedInfo\":{\"skewedColNames\":[\"col1\",\"col3\"],\"skewedColValues\":[[\"2\",\"1\"],[\"3\",\"2\"]],\"skewedColValueLocationMaps\":{}},\"storedAsSubDirectories\":false},\"parameters\":{\"totalSize\":\"0\",\"numRows\":\"-1\",\"rawDataSize\":\"-1\",\"COLUMN_STATS_ACCURATE\":\"false\",\"numFiles\":\"0\",\"transient_lastDdlTime\":\"1582293531\",\"$ref\":\"$[0].parameters\"},\"parametersSize\":7}]}";
        System.out.println(str);
        ResultData obj = JSON.parseObject(str, ResultData.class);
    }

    public static class ResultData
    {
        private boolean success;
        private String message;
        private Object data;
    }
}
