FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Added beautify function by gborghesan · Pull Request #24 · rxi/json.lua · GitHub

Repository navigation

Added beautify function - #24

Open
gborghesan wants to merge 1 commit into
rxi:masterfrom
gborghesan:master
Open

gborghesan wants to merge 1 commit into
rxi:masterfrom
gborghesan:master

Conversation

Copy link
Copy Markdown

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

aryajur commented Jul 28, 2020

Copy link
Copy Markdown

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.

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL