public class JsonFileBuilder extends Object
Builds a JSON file containing the data in a RowSet.
You can find an example of how to use JsonFileBuilder at
ExampleTest.secondTest().
| Constructor and Description |
|---|
JsonFileBuilder(RowSet rowSet)
Creates a
JsonFileBuilder that will write the given RowSet to a file. |
| Modifier and Type | Method and Description |
|---|---|
void |
build(File tableFile)
Writes the configured data to the given file in json format.
|
JsonFileBuilder |
extended(boolean flag) |
JsonFileBuilder |
prettyPrint(boolean flag) |
public JsonFileBuilder(RowSet rowSet)
JsonFileBuilder that will write the given RowSet to a file.rowSet - The RowSet to be written to a file.public JsonFileBuilder prettyPrint(boolean flag)
public JsonFileBuilder extended(boolean flag)
public void build(File tableFile) throws IOException
tableFile - The file to write the json data to.IOExceptionCopyright © 2022 The Apache Software Foundation. All rights reserved.