โ ๏ธ 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