We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Standerted JSON.stringify allows an argument for \t and \n for indentation purposes as follows:
JSON.stringify({ uno: 1, dos: 2 }, null, '\t'); // returns the string: // '{ // "uno": 1, // "dos": 2 // }'
JSON.prune supports it as well?
The text was updated successfully, but these errors were encountered:
At the moment there's no support for improved formatting, and it can't follow the same exact syntax because the second argument is an option object.
This could be modified but I'm not sure there's really a need.
If you're not performance tied, you can use JSON.prune to produce a pruned object then use the standard representation:
JSON.prune
let pruned = JSON.parse(JSON.prune(yourObject)); let json = JSON.stringify(pruned, null, '\t');
Sorry, something went wrong.
No branches or pull requests
Standerted JSON.stringify allows an argument for \t and \n for indentation purposes as follows:
JSON.prune supports it as well?
The text was updated successfully, but these errors were encountered: