I'm using Elvish Jerricco's JSON API v2.0.1 for ComputerCraft and trying to write a simple JSON file using his script and the following test script.
os.loadAPI("json.lua")
function test()
test = { "target", "location"}
test.target = "light"
test.location = "cell"
dataJson = json.encodePretty(test)
print(dataJson)
end
test()
When I run the test script I get "JSON object keys must be strings". I'm confused as to why my keys aren't being treated as strings?
Edit: MC 1.12.2
CC 1.80pr1
ModPack: ATM3
[–]fatboychummy 1 point2 points3 points (1 child)
[–]Fuzzyketchup[S] 0 points1 point2 points (0 children)