class DataSetLoaderProvider implements LoaderProvider<IDataSet> {

    @Override
    public DataSetLoader<IDataSet> jsonLoader() {
        return (final File path) -> {
            try (InputStream in = new FileInputStream(path)) {
                return defineReplaceableExpressions(new CachedDataSet(new JsonDataSetProducer(in), false));
            } catch (final DataSetException e) {
                throw new IOException(e);
            }
        };
    }

}