<body><script type="text/javascript"> function setAttributeOnload(object, attribute, val) { if(window.addEventListener) { window.addEventListener('load', function(){ object[attribute] = val; }, false); } else { window.attachEvent('onload', function(){ object[attribute] = val; }); } } </script> <div id="navbar-iframe-container"></div> <script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script> <script type="text/javascript"> gapi.load("gapi.iframes:gapi.iframes.style.bubble", function() { if (gapi.iframes && gapi.iframes.getContext) { gapi.iframes.getContext().openChild({ url: 'https://www.blogger.com/navbar.g?targetBlogID\x3d8211560\x26blogName\x3dTech+Tips,+Tricks+%26+Trivia\x26publishMode\x3dPUBLISH_MODE_BLOGSPOT\x26navbarType\x3dBLUE\x26layoutType\x3dCLASSIC\x26searchRoot\x3dhttp://mvark.blogspot.com/search\x26blogLocale\x3den\x26v\x3d2\x26homepageUrl\x3dhttp://mvark.blogspot.com/\x26vt\x3d-5147029996388199615', where: document.getElementById("navbar-iframe-container"), id: "navbar-iframe" }); } }); </script>

Tech Tips, Tricks & Trivia

by 'Anil' Radhakrishna
A seasoned developer's little discoveries and annotated bookmarks.

Search from over a hundred HOW TO articles, Tips and Tricks


A quick way to check latest values of Sensex, Nifty, Gold, Silver, USD-INR currency

I occasionally like to catch up on how the Indian stock exchanges are faring. I like the Economic Times newspaper website for its brevity and focus on facts & numbers. The homepage of their website is quite bulky with lots of ads, so I started using their mobile version of their site as it loads faster - m.economictimes.com

Most of the times, I'm just interested in the indices. I realized today that I can just look at their continuously updating JSON feed - http://json.bselivefeeds.indiatimes.com/homepagedatanew.json
The data is less than 1KB. Though it has poor readability, I get what I want pretty quickly.

I also discovered that there are plenty of online JSON Viewers that present information as a tree view. While I found some online viewers that were open-source and could load a public JSON feed URL, I could not find any online viewer that could handle JSONP and strip everything outside the main opening and closing braces like function name, comments and brackets like my favorite desktop JSON Viewer does. Therefore, the above mentioned feed cannot directly be used with online viewers.

Update: The Online JSON Viewer by Gabor Turi written using Ext JS, can taken a JSON feed URL as input & format it neatly. So by appending the above mentioned URL thus - http://jsonviewer.stack.hu/#http://json.bselivefeeds.indiatimes.com/homepagedatanew.json

..I get a better readable view of the JSON feed


Also see: HOW TO view historical data of Sensex & Nifty indices with Google Docs Spreadsheet

Labels: ,

Tweet this | Google+ it | Share on FB

« Home | Next »
| Next »
| Next »
| Next »
| Next »
| Next »
| Next »
| Next »
| Next »
| Next »

»

Post a Comment