Props to @petrocket for showing me a method he used to parse JSON inside of Lua…
I saved this json lua script to dev/<my_project>/scripts/json.lua
Since LY 1.24 uses Lua 5.1, I had to replace line #238 to use loadstring() instead of load()
Afterwards, I imported the json.lua util script into my own lua script via
local json = require "scripts/json"
The filepath had to use forward slash otherwise I was receiving the same errors about module ‘json’ not found:Module “json.luac” has not been registered with the Asset Database.
Example Lua File using JSON:
ly115976_LuaScriptRequiringJSON.zip (456 Bytes)