Home Page Icon
Home Page
Table of Contents for
Title
Close
Title
by Ben Smith
Beginning JSON
Cover
Title
Copyright
Dedication
Contents at a Glance
Contents
About the Author
About the Technical Reviewer
Acknowledgments
Introduction
Chapter 1: JavaScript Basics
JavaScript History
JavaScript Essentials
Values
Primitive Types
Expressions
Operators
Statements
Line Terminators
Control Statements
Block Statements
Truthy/Falsy
Loop Statements
Declarations
Variables
Functions
Summary
Key Points from This Chapter
Chapter 2: Special Objects
Objects
Objects Are Collections
Built-in Objects
Object
Creating Objects
Access Notation
Array
Object Literals
Designing Literals
The Object Literal
The Array Literal
Summary
Key Points from This Chapter
Chapter 3: String Manipulation
String Concatenation
The String Object
Creating String Objects
The Interface of the String Object
length
toString
charAt
indexOf
lastIndexOf
match
replace
slice
substr
split
toUpperCase
toLowerCase
The Implicit String Object
Summary
Key Points from This Chapter
Chapter 4: Introducing JSON
History
JSON Grammar
Composite Structures
JSON Values
JSON Tokens
Summary
Key Points from This Chapter
Chapter 5: Creating JSON
The Serialization Process—Demystified
The JSON Object
stringify
Summary
Key Points from This Chapter
Chapter 6: Parsing JSON
JSON.parse
eval
reviver
Summary
Key Points from This Chapter
Chapter 7: Persisting JSON: I
HTTP Cookie
Syntax
document.cookie
Web Storage
Web Storage Interface
Summary
Key Points from This Chapter
Chapter 8: Data Interchange
Hypertext Transfer Protocol
HTTP-Request
HTTP Response
Ajax
XMLHttpRequest Interface
Global Aspects
The Request Aspect
The Response Aspect
Obtaining the Response
Summary
Key Points from This Chapter
Chapter 9: X-Origin Resources
Same-Origin Policy
Circumventing Same-Origin Policy
CORS
The Proxy
JSONP
Summary
Key Points from This Chapter
Chapter 10: Serving JSON
Node.JS
Windows Installation
Mac Installation
Building an HTTP Server
Node HTTP Web Server
Node API
Modules
The HTTP Module
http.createServer
http.IncomingMessage
http.ServerResponse
http.Server
CORS-Enabled Server
JSONP Server
The Proxy Server
http.request
http.Stream
http.ClientRequest
Summary
Key Points from This Chapter
Chapter 11: Posting JSON
Request Entity Body
HTML Form POST
Processing a JSON POST
Preflight Request
OPTIONS Request Method
What Determines Preflight
Summary
Key Points from This Chapter
Chapter 12: Persisting JSON: II
CouchDB
Windows Installation
Mac Installation
Working with CouchDB
Futon
Creating Views
Creating Our First Custom View
Connecting Node and CouchDB
Cradle for Node
Working with Databases
Cradle Database API
Creating Documents via Cradle
Creating Design Documents via Cradle
Summary
Key Points from This Chapter
Chapter 13: Working with Templates
Templating Engine
Handlebars
Installation
Working with Handlebars
A Basic Expression
The Role of <script>
Compiling a Template
Giving Context to Our Template
Multiple Placeholders
Complex JSON Structures
Block Expressions
Block Expressions and Arrays
Applying Logic to Logic-less Templates
Helpers
Summary
Key Points from This Chapter
Chapter 14: Putting It All Together
Twitter
Twitter Apps
Keys and Access Tokens
Public Stream
Your User Access Token
#Trending
Node.js
Twitter Module
Incorporating the Twitter Module
Streaming API (Stable)
Statuses/Filter
CouchDB
Incorporating the Cradle Module
Creating a View
Enabling CORS
Ajax
Requesting Ranges
Handlebars
Summary
Index
Search in book...
Toggle Font Controls
Playlists
Add To
Create new playlist
Name your new playlist
Playlist description (optional)
Cancel
Create playlist
Sign In
Email address
Password
Forgot Password?
Create account
Login
or
Continue with Facebook
Continue with Google
Sign Up
Full Name
Email address
Confirm Email Address
Password
Login
Create account
or
Continue with Facebook
Continue with Google
Prev
Previous Chapter
Cover
Next
Next Chapter
Copyright
Beginning JSON
Ben Smith
Add Highlight
No Comment
..................Content has been hidden....................
You can't read the all page of ebook, please click
here
login for view all page.
Day Mode
Cloud Mode
Night Mode
Reset