AJAX example: The phone-book

The “database”: people.json

I initially intended use a MySQL database for this, but I thought that would complicate the example unnecessarily. So, I decided to use a JSON file instead, which also means that I can show the exact contents here below. For many years, I practically always used the XML format when storing structured data in a file, but nowadays I prefer JSON when the data is not too complex.

The phone-book database contains fifty persons with first name, last name and phone number. There is also a unique id for the person (an integer sequence number). All data have been generated, meaning that all names and phone numbers are completely fake. This is the complete JSON file:


Comments

AJAX example: The phone-book — 1 Comment

  1. Pingback: How to use AJAX with JSON and without jQuery | iseborn.eu

Add Comment Register



Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">