diff options
Diffstat (limited to 'Master/texmf-dist/tex/context/base/mkiv/util-jsn.lua')
-rw-r--r-- | Master/texmf-dist/tex/context/base/mkiv/util-jsn.lua | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/Master/texmf-dist/tex/context/base/mkiv/util-jsn.lua b/Master/texmf-dist/tex/context/base/mkiv/util-jsn.lua index e835c07d648..e5f83e06c47 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/util-jsn.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/util-jsn.lua @@ -21,7 +21,7 @@ local format = string.format local utfchar = utf.char local concat = table.concat -local tonumber, tostring, rawset, type = tonumber, tostring, rawset, type +local tonumber, tostring, rawset, type, next = tonumber, tostring, rawset, type, next local json = utilities.json or { } utilities.json = json @@ -158,4 +158,11 @@ end -- inspect(json.tostring(true)) +function json.load(filename) + local data = io.loaddata(filename) + if data then + return lpegmatch(jsonconverter,data) + end +end + return json |