Live data from Hacker News

Show HN: Pretty print invalid JSON (or anything that looks sort of like JSON)

prettyprintplease.com

1–5 of 5 posts

Re: Show HN: Pretty print invalid JSON (or anything that looks sort of like JSON)

#2
Hi HN! This was a python script I used on the command line for a while, before spending a weekend converting it to a microsite.

Pretty print json with single quotes or None or anything that looks like json, like python dictionaries/arrays or anything that PHP can spit out.

Re: Show HN: Pretty print invalid JSON (or anything that looks sort of like JSON)

#5
It doesn't work too well wish some actual valid jsons:

Input:

{"somekey": "value", "someother": "value,value,value"}

Output:

{

  "somekey": "value",

  "someother": "value,

  value,

  value"
}

Seems like the problem is with commas being converted to ,\n regardelss of them being inside a valid string.