json.lua
json.lua copied to clipboard
Added beautify function
As I need to have a human-readable file, I added a function to insert newlines and tabs to an already encoded json string (what you explicitly excluded in your documentation).
Hi, It would be much more efficient to compile the string bits into a table array and then use table.concat in the end rather than concatenating the strings at each step. It makes a huge difference in terms of speed when the size of data becomes large. See https://github.com/aryajur/tableUtils/blob/master/src/tableUtils.lua#L114.