bugdown: Parse argument JSON files as streams.

This commit is contained in:
Yago González
2018-05-15 17:49:16 +02:00
committed by Tim Abbott
parent f81b936727
commit f9f8d9c578

View File

@@ -44,7 +44,7 @@ class APIArgumentsTablePreprocessor(Preprocessor):
json_filename = os.path.normpath(os.path.join(self.base_path, json_filename))
try:
with open(json_filename, 'r') as fp:
json_obj = ujson.loads(fp.read())
json_obj = ujson.load(fp)
arguments = json_obj[doc_filename]
text = self.render_table(arguments)
except Exception as e: