json.lua icon indicating copy to clipboard operation
json.lua copied to clipboard

Added beautify function

Open gborghesan opened this issue 5 years ago • 1 comments

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).

gborghesan avatar Apr 30 '20 09:04 gborghesan

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.

aryajur avatar Jul 28 '20 01:07 aryajur