Tuesday, May 5, 2015

Using pure good ol' fashioned JavaScript to access The Beatles' albums in JSON format

Here's an example of how to retrieve JSON data using pure good ol' fashioned JavaScript. I'm a big fan of jQuery, and don't have anything against other JavaScript frameworks, but sometimes going back to the basics, and knowing how to do it with just JavaScript is good for you.

In this example we'll use The Beatles' albums data from a free data service called MySafeInfo. You can view the configurable options for this particular dataset by clicking here. Or you can view the raw data for this example by clicking here.



This example relies on JavaScript and uses mysafeinfo.com to retrieve The Beatles' albums data in JSON format. MySafeInfo is a free service we offer to software developers to provide test data in a simple, flexible manner, in a variety of formats, including XML, JSON, JSONP, CSV, and more.

Here are some additional resources I came across while preparing this example.

Matt Pavey is a Microsoft Certified software developer who specializes in ASP.Net, VB.Net, C#, AJAX, LINQ, XML, XSL, Web Services, SQL, jQuery, and more. Follow on Twitter @matthewpavey

0 comments: