Chapter 9. Handling JSON Data: Client, Meet Server

image with no caption

As useful as reading data from an XML file was, that won’t always cut the mustard. A more efficient data interchange format (JavaScript Object Notation, aka JSON) will make it easier to get data from the server side. JSON is easier to generate and read than XML, too. Using jQuery, PHP, and SQL, you’ll learn how to create a database to store information so you can retrieve it later, using JSON, and display it on the screen using jQuery. A true web application superpower!

Webville MegaCorp’s Marketing Department doesn’t know XML

From: Webville MegaCorps Marketing

Subject: Re: 42nd Annual Bit to Byte Race results page

Hey Web Design Team,

We really like the updates you’ve made to the website.

We have a problem though: nobody in our office knows XML! So we don’t know how to add new finishers to the race website.

We’ve tried, but every time we get it wrong, it makes the website do some strange things... Finishers don’t show, or fields disappear from the page even though they’re in the XML file. It’s very odd.

What we’d really like is some way to just type into a few boxes and click a button to add a finisher. Can you make this happen?

And if we make a mistake, can you make it so we don’t break the whole site?

I know it’s only three days until we all fly out to Hawaii, but we’d really like this working before we go. Do you think you can make it in ...

Get Head First jQuery now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.