Grow your CSS skills. Land your dream job.

How do you make embedded JSON look pretty?

  • # August 14, 2011 at 5:44 pm

    I’m looking to embed JSON into HTML pages, so people can see the raw JSON, and I’d like to know if anyone knows of an easy way to make it look better and more readable than just a monospace font. Maybe something like a syntax highlighter.

    Thanks

    # August 14, 2011 at 5:50 pm

    Try JSONLint to validate and format the JSON. Then any syntax highlighter should work, since it’s just javascript. I like Chili, but there are many other syntax highlighters out there.

    # August 15, 2011 at 4:17 am

    Thanks Mottie,

    Does Chili support JSON? Not a great load of documentation with it.

    # August 15, 2011 at 12:59 pm

    JSON is javascript, so anything that highlights javascript will work.

    Hmmm, I forgot about the lack of documentation… maybe try SyntaxHighlighter instead

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".