Package dev.frostlake.executor.copy
Class JsonStageReader
java.lang.Object
dev.frostlake.executor.copy.JsonStageReader
- All Implemented Interfaces:
StageFileReader
JSON staged-file reader: a top-level array yields one record per element, otherwise the file is read as
newline-delimited JSON (one record per non-blank line).
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionThe FILE_FORMAT TYPE this reader handles (e.g.List<tools.jackson.databind.JsonNode> readRecords(Path file) Parsefileinto its records.
-
Constructor Details
-
JsonStageReader
public JsonStageReader()
-
-
Method Details
-
readRecords
Description copied from interface:StageFileReaderParsefileinto its records. An unreadable/malformed file throws (a bad load is never silent).- Specified by:
readRecordsin interfaceStageFileReader- Throws:
IOException
-
formatType
Description copied from interface:StageFileReaderThe FILE_FORMAT TYPE this reader handles (e.g."JSON"), matched case-insensitively.- Specified by:
formatTypein interfaceStageFileReader
-