pmusolino / Wormholy

iOS network debugging, like a wizard 🧙‍♂️
MIT License
2.32k stars 184 forks source link

Update formatting to make request/responses easier to read #66

Closed colinhumber closed 4 years ago

colinhumber commented 4 years ago

The prettyPrintedJSON method that was there before was generating some incorrect JSON. For example, in the /photos response there were some commas missing.

[
{
  "thumbnailUrl" : "https:\/\/via.placeholder.com\/150\/92c952",
  "url" : "https:\/\/via.placeholder.com\/600\/92c952",
  "title" : "accusamus beatae ad facilis cum similique qui sunt",
  "id" : 1,
  "albumId" : 1
}{ <-- here
  "albumId" : 1,
  "id" : 2,
  "title" : "reprehenderit est deserunt velit ipsam",
  "thumbnailUrl" : "https:\/\/via.placeholder.com\/150\/771796",
  "url" : "https:\/\/via.placeholder.com\/600\/771796"
}{ <-- here
  "id" : 3,
  "url" : "https:\/\/via.placeholder.com\/600\/24f355",
  "albumId" : 1,
  "thumbnailUrl" : "https:\/\/via.placeholder.com\/150\/24f355",
  "title" : "officia porro iure quia iusto qui ipsa ut modi"
}....

I switched it to let the system do the pretty printing as the Dictionary.prettyPrintedJSON was doing.

colinhumber commented 4 years ago

@pmusolino Btw thanks for all the work on this library!

pmusolino commented 4 years ago

Thank you very much @colinhumber for clarifying this particular!