We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7749102 commit 77f53e5Copy full SHA for 77f53e5
singularity/utils.py
@@ -225,6 +225,15 @@ def read_file(filename,mode="r"):
225
return content
226
227
228
+def read_json(filename,mode='r'):
229
+ '''read_json reads in a json file and returns
230
+ the data structure as dict.
231
+ '''
232
+ with open(filename,mode) as filey:
233
+ data = json.load(filey)
234
+ return data
235
+
236
237
############################################################################
238
## OTHER MISC. #############################################################
239
0 commit comments