public final class JsonExtractUtils extends Object
| 构造器和说明 |
|---|
JsonExtractUtils() |
| 限定符和类型 | 方法和说明 |
|---|---|
static void |
append(List<List<Object>> dataset,
List<List<Object>> subset)
Appends the sub dataset after dataset last row, as new row
[[1,2], [3,4]] append [["a","b"], ["c","d"]] => [[1,2], [3,4], ["a","b"], ["c","d"]]
|
static void |
concat(List<List<Object>> dataset,
List<List<Object>> subset)
Concats the sub dataset after dataset last column, as new column
[[1,2], [3,4]] concat [["a","b"], ["c","d"]] => [[1,2,"a","b"], [3,4,"c","d"]]
|
static void |
concat(List<List<Object>> dataset,
Object value)
Concats the sub dataset after dataset last column, as new column
[[1,2], [3,4]] concat "a" => [[1,2,"a"], [3,4,"a"]]
|
static TableStructure |
extractData(Object object,
JsonTree tree)
Returns a DataStructure object by user specified json columns in tree
|
static DataStructure |
extractData(String original,
JsonTree tree) |
static TreeNode<JsonId,Null> |
extractSchema(Object obj)
Returns a tree data of extracted the json data structure schema
|
static TreeNode<JsonId,Null> |
extractSchema(String text) |
public static TreeNode<JsonId,Null> extractSchema(String text) throws ParseException
ParseExceptionpublic static TreeNode<JsonId,Null> extractSchema(Object obj) throws ParseException
obj - the object of use JSON.parse(String) parsedParseExceptionpublic static DataStructure extractData(String original, @Nonnull JsonTree tree)
public static TableStructure extractData(@Nonnull Object object, @Nonnull JsonTree tree)
object - the object of use JSON.parse(String) parsedtree - the json treepublic static void append(List<List<Object>> dataset, List<List<Object>> subset)
dataset - the datasetsubset - the sub datasetpublic static void concat(List<List<Object>> dataset, Object value)
dataset - the datasetvalue - the new column vlaueCopyright © 2023. All rights reserved.