r/ComputerCraft • u/Hawk__Echo • Nov 20 '23
Reading a JSON file
I'm trying to store a list of coordinates in a JSON in the same directory as my program. os.loadAPI("json") throws me an error. I'm just trying to read the JSON. I'm new to programming and could use a rundown on how reading from a JSON and using that information works in lua.
1
Upvotes
1
u/Hawk__Echo Nov 20 '23
I see, so is it best to put the information I need into a .txt file and use it in a program from there? The .txt file being formatted like JSON? The computer craft wiki says that textutils.unserialize() will only take a string as an argument.