โš ๏ธ Warning: This post is over a year old, the information may be out of date.

๐Ÿ“ Beautify `JSON` on web browser without addons

๐Ÿ“… | โฐ 1 minutes

Hi everyone! Nowadays, most of developers use a notation on data structure representation that called as JSON.

The nested and super-long single or multilines key/values, it will be a great pleasure if the JSON are well formatted and beautify for easy reading by human.

Unfortunately, some company are blocking their user from installing addons. Which make it someone who need to read the JSON data, for example whom work as developer over there.

But do-not worry, I have a trick for this situation. First, you need to create new bookmarks on your browser and add this one line javascript code below as URL.

javascript:(function(){document.body.innerHTML=JSON.stringify(JSON.parse(document.body.textContent), null, 4);document.body.style='white-space: pre;font-family:monospace';})()

Now, when you open an API that are clunky and not well format, all you need todo is press the bookmark that we just created before.

The bookmarks will beautify the javascript and you now can read the JSON earsier from here ๐ŸŒธ

Posted by: Robbi Nespu

Edit

Have some thoughts, discussion or feedback on this post?

๐Ÿ’ฌย Send me an email

What is webmention? How to send interactions!

Below you can find all of webmention with this page. Which means, you also can mentioned this URL on any website that support WebMention. Have you written a response to this post? Let me know the URL:

Do you use a website that don't have WebMention capabilities? You can just use Comment Parade!