diff --git a/GEODE/Store/JSON.py b/GEODE/Store/JSON.py new file mode 100644 index 0000000000000000000000000000000000000000..df71be83b06f1c1e740bb09570c3c647e83cc540 --- /dev/null +++ b/GEODE/Store/JSON.py @@ -0,0 +1,9 @@ +import json + +def load(inputJSON): + with open(inputJSON, 'r') as inputFile: + return json.load(inputFile) + +def save(value, outputJSON): + with open(outputJSON, 'w') as outputFile: + json.dump(value, outputFile, separators=(',', ':')) diff --git a/GEODE/Store/__init__.py b/GEODE/Store/__init__.py index 5af23d3520abfb976b66e9b4469665c901a4c0d0..d753518c97465b386c5ba289bc260b694cd28bbe 100644 --- a/GEODE/Store/__init__.py +++ b/GEODE/Store/__init__.py @@ -1,4 +1,5 @@ from GEODE.Store.Corpus import corpus, Directory, SelfContained +import GEODE.Store.JSON as JSON from GEODE.Store.Tabular import tabular, toTSV import os import os.path