java.lang.Object
org.apache.arrow.vector.ipc.JsonFileWriter
- All Implemented Interfaces:
AutoCloseable
A writer that converts binary Vectors into an internal, unstable JSON format suitable
for integration testing.
This writer does NOT implement a JSON dataset format like JSONL.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classConfiguration POJO for writing JSON files. -
Constructor Summary
ConstructorsConstructorDescriptionJsonFileWriter(File outputFile) Constructs a new writer that will output tooutputFile.JsonFileWriter(File outputFile, JsonFileWriter.JSONWriteConfig config) Constructs a new writer that will output tooutputFilewith the given options. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()config()voidstart(Schema schema, DictionaryProvider provider) Writes out the "header" of the file including the schema and any dictionaries required.voidwrite(VectorSchemaRoot recordBatch) Writes the record batch to the JSON file.
-
Constructor Details
-
JsonFileWriter
Constructs a new writer that will output tooutputFile.- Throws:
IOException
-
JsonFileWriter
Constructs a new writer that will output tooutputFilewith the given options.- Throws:
IOException
-
-
Method Details
-
config
-
start
Writes out the "header" of the file including the schema and any dictionaries required.- Throws:
IOException
-
write
Writes the record batch to the JSON file.- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Throws:
IOException
-