()
| 685 | } |
| 686 | |
| 687 | private final void executeJSON() { |
| 688 | Reader reader = null; |
| 689 | |
| 690 | try { |
| 691 | reader = input.reader(); |
| 692 | Result<Record> r = new JSONReader<>(configuration.dsl(), converterContext(configuration), null, null).read(Source.of(reader)); |
| 693 | source = r.fields(); |
| 694 | |
| 695 | // The current json format is not designed for streaming. Thats why |
| 696 | // all records are loaded at once. |
| 697 | List<Object[]> allRecords = Arrays.asList(r.intoArrays()); |
| 698 | executeSQL(allRecords.iterator()); |
| 699 | } |
| 700 | finally { |
| 701 | safeClose(reader); |
| 702 | } |
| 703 | } |
| 704 | |
| 705 | private final void executeCSV() { |
| 706 | CSVReader reader = null; |
no test coverage detected