JSON

JSON is a methodology used to serialize JavaScript objects so they can be passed from the client to the server or be sent from the server to the client. Since all JavaScript objects are key/value pair maps as described in Chapter 2, this serialization is actually fairly straightforward. In Figure 10-3 you will notice that the serialized session object appears to be the definition for a standard JavaScript map if it were to be hard-coded.

Image

In fact this is exactly what it is. When a JavaScript object is serialized, the attributes of the object are iterated over and a map definition string like the one seen in the preceding example is generated. ...

Get Oracle Database Ajax & PHP Web Application Development 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.