Hey, I’ve been having issues with this code, and seems like I can’t figure out what’s wrong with it. Could y’all help me out? The full code is listed in the below: _L is used for a framework, don’t worry about it.
Do you need it to support mixed tables and userdata? I could write you a quick deep copy function to do the job. I’m not familiar with json operations but I believe they’re a little expensive as far as copying tables goes. Anyways, the error means that either tbl is nil, or the result of JSONEncode is nil. I couldn’t say which since they’re both part of the same expression, and from what I have to go on I don’t have a way to know why either of them would be nil.
Anyways, if you want the deep copy function, just let me know and I’ll post it here.
Thanks for the help, sure you can. I only use JSON for other services, as well as I use this module for cloning player’s data, and other things that are needed of store. Also, it doesn’t need mixed table and data.