JsonShredder implements Callable<Long> { public static JsonReader createFileReader(final Path path) { checkNotNull(path); try { final var fileReader = new FileReader(path.toFile()); final var jsonReader = new JsonReader(fileReader); jsonReader.setLenient(true); return jsonReader; } catch (final FileNotFoundException e) { throw new UncheckedIOException(e); } } private  JsonShredder(final Builder builder); @Override Long call(); ObjectRecordValue<?> getObjectRecordValue(); static void main(final String... args); static JsonReader createFileReader(final Path path); static JsonReader createStringReader(final String json);  }
@Ignore @Test public void testChicago() { try { final var jsonPath = JSON.resolve("cityofchicago.json"); Databases.createJsonDatabase(new DatabaseConfiguration(PATHS.PATH1.getFile())); try (final var database = Databases.openJsonDatabase(PATHS.PATH1.getFile())) { database.createResource(ResourceConfiguration.newBuilder(JsonTestHelper.RESOURCE) .versioningApproach(VersioningType.SLIDING_SNAPSHOT) .buildPathSummary(true) .hashKind(HashType.NONE) .useTextCompression(false) .build()); try (final var manager = database.openResourceManager(JsonTestHelper.RESOURCE); final var trx = manager.beginNodeTrx(10_000_000)) { trx.insertSubtreeAsFirstChild(JsonShredder.createFileReader(jsonPath)); } } } catch (Error e) { e.printStackTrace(); } }