Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Simple pretty printing???????

See original GitHub issue

Add 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:open
  • Created 5 years ago
  • Reactions:4
  • Comments:19 (6 by maintainers)

github_iconTop GitHub Comments

camdenorrbcommented, Dec 7, 2018

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

cbeustcommented, Feb 15, 2019

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?

Read more comments on GitHub >

github_iconTop 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: simple -guide-to-the-pprint-module-in-python/Email Academy: ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found