Simple pretty printing???????
See original GitHub issueAdd a parameter to toJsonString
to take in a boolean for whether or not it should pretty print so we don’t have to reread the string into a JsonObject and then pretty print
Example of how it should not be:
val builder = StringBuilder(Klaxon().toJsonString(object))
val result = (Parser().parse(builder) as JsonObject).toJsonString(true)
Example of how it should be:
val result = Klaxon().toJsonString(object, prettyPrint = true)
Not only will this allow for less overhead, but the syntax would make more sense while also being pretty
Issue Analytics
- State:
- Created 5 years ago
- Reactions:4
- Comments:19 (6 by maintainers)
Top Results From Across the Web
pretty-simple: pretty printer for data types with a 'Show' instance.
pretty-simple can be used to pretty-print any String that is similar to Haskell data types. The only requirement is that the String must ......
Read more >Pretty-printing - Aelve Guide | Haskell
Pretty -printing is the process of formatting text files (ex. source code) ... pretty-simple is a pretty printer for Haskell data types that...
Read more >pprint — Data pretty printer — Python 3.11.1 documentation
The pprint module provides a capability to “pretty-print” arbitrary Python data structures in a form which can be used as input to the...
Read more >Prettify Your Data Structures With Pretty Print in Python
The pprint module, Python's data pretty printer, is a useful part of the standard library. You can work with it for debugging data...
Read more >Python pprint - A Simple Guide to Pretty Printing - YouTube
Full Tutorial: https://blog.finxter.com/a- simple -guide-to-the-pprint-module-in-python/Email Academy: ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@markusmoormann This isn’t a syntax issue, the whole idea of converting it to a string just to parse it again just to convert it again is just stupid.
This is all getting a bit confusing 😃
How about people interested in a change send a pull request so I can see what they want?