File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change 386
386
387
387
-- MAD extensions --------------------------------------------------------------
388
388
389
- local openfile in MAD .utility
390
-
391
389
function json .write (filnam_ , val )
392
- local file = assert (openfile (filnam_ , ' w' ),
390
+ local file = assert (MAD . utility . openfile (filnam_ , ' w' ),
393
391
" unable to open JSON file in write mode" )
394
392
file :write (json .encode (val ))
395
393
if is_string (filnam_ ) then file :close () else file :flush () end
@@ -400,7 +398,7 @@ function json.print (val)
400
398
end
401
399
402
400
function json .read (filnam_ )
403
- local file = assert (openfile (filnam_ , ' r' ),
401
+ local file = assert (MAD . utility . openfile (filnam_ , ' r' ),
404
402
" unable to open JSON file in read mode" )
405
403
local val = json .decode (file :read (" *a" ))
406
404
if is_string (filnam_ ) then file :close () end
You can’t perform that action at this time.
0 commit comments