Search code examples
jsonpretty-printjson-ld

What are the advantages and disadvantages of pretty printing JSON?


Pretty printing JSON will tend to make it heavier than those rendered without pretty print. Beyond that I can't think else of something between pretty printing or not.

Let's say you want to provide web services for a public RESTful Web API, will it affect server performance, round-trip time, etc.?

So again, what are the advantages and disadvantages of pretty printing JSON?


Solution

  • Advantages

    1. Easier to read

    Disadvantages

    1. The size of the data will increase
    2. There will be some computational overhead

    Thinking about this for all of 4 more seconds, I can't add any more to those lists! :P