jtablesaw / tablesaw

Java dataframe and visualization library
https://jtablesaw.github.io/tablesaw/
Apache License 2.0
3.56k stars 645 forks source link

about JSONObject is Unsupported,here is some code #1193

Open sxq-web opened 1 year ago

sxq-web commented 1 year ago

public static Table buildColumn(Table table, JSONObject jsonObject){

    jsonObject.forEach((key, value) -> {
                Map<String, String> values = JSONObject.parseObject(value.toString(), new TypeReference<Map<String, String>>() {});
                table.addColumns(StringColumn.create(key, values.values()));
            }
    );
    return table;
}