|
|
Registered tutorials: 501 Registered Users: 33355
|
|
Rating: 1 out of 2 votes cast
Category: Ajax and PHP
|
Mastering Ajax, Part 11: JSON on the server side
Abstract: In this article you will learn how to handle data sent to a server in the JSON format and how to reply to scripts using the same format
JSON's real value As discussed in the previous article in this series, JSON is a useful format for Ajax applications because it allows you to convert between JavaScript objects and string values quickly. Because Ajax apps are best suited to send plain text to server-side programs and receive plain text in return, an API that generates text is almost always preferable over an API that doesn't; further, JSON allows you to work with native JavaScript objects and not worry about how those objects will be represented. XML provides the same textual benefits, but the APIs for converting JavaScript objects into XML (and there are a few) aren't as mature as the JSON APIs; you'll sometimes have to take care in creating and working with your JavaScript objects to ensure that you're doing things that can work with the XML conversion API you've chosen. The same isn't true with JSON: it handles pretty much every conceivable object type and simply gives you back a nice JSON data representation.
|
Reviews:
Rate and Review This Site
No reviews yet
Statistic Information About this Resource:
| Total Hits: |
47 |
| Unique Hits: |
37 |
| |
Daily |
Weekly |
Monthly |
| |
Unique |
Total |
Unique |
Total |
Unique |
Total |
| Average |
0 |
0 |
0.1 |
0.1 |
1.3 |
1.8 |
| Current |
0 |
0 |
0 |
0 |
0 |
0 |
| Previous |
0 |
0 |
1 |
1 |
1 |
1 |
| Dec 2 |
0 |
0 |
0 |
0 |
1 |
1 |
| Dec 1 |
0 |
0 |
0 |
0 |
1 |
2 |
| Nov 30 |
0 |
0 |
0 |
0 |
1 |
1 |
| Nov 29 |
0 |
0 |
0 |
0 |
4 |
6 |
| Nov 28 |
0 |
0 |
0 |
0 |
1 |
2 |
| Nov 27 |
0 |
0 |
0 |
0 |
0 |
0 |
| Nov 26 |
0 |
0 |
0 |
0 |
3 |
4 |
| Nov 25 |
0 |
0 |
0 |
0 |
1 |
1 |
| Highest |
3 |
3 |
9 |
11 |
13 |
17 |
|
|
|
Script Execution Time: 0.76493 | SQL Queries: 10 | Members: 501
Ajax Tutorial Top List - Powered by Aardvark Topsites PHP 5.1.2
|