售 价:¥
温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印
为你推荐
Title Page
Copyright and Credits
JavaScript and JSON Essentials Second Edition
Dedication
Packt Upsell
Why subscribe?
PacktPub.com
Contributors
About the authors
About the reviewers
Packt is searching for authors like you
Preface
Who this book is for
What this book covers
To get the most out of this book
Download the example code files
Download the color images
Conventions used
Get in touch
Reviews
Getting Started with JSON
JSON, a data exchange format
The Hello World program with JSON
How is JSON stored in memory?
Datatypes in JSON
Languages that support JSON
JSON implementation in PHP
JSON implementation in Python
Summary
The JSON Structures
Inserting external JavaScript
Accessing objects in JSON
Performing complex operations
Modifying JSON
Summary
AJAX Requests with JSON
Basic web operations
Synchronous vs. asynchronous
Requirements for AJAX
Setting up a node.js server
Hosting JSON
Making your first AJAX call
Traditional callbacks
Handling asynchronousity using a promise
New ECMAScript generators
Parsing JSON data
Summary
Cross-Domain Asynchronous Requests
The API story
Making GET and POST AJAX calls with JSON data
The problem with cross-domain AJAX calls
Introduction to JSONP
Implementation at server-side
Implementing JSONP at client-side (browsers)
Summary
Debugging JSON
Using the developer tools
Validating JSON
Formatting JSON
Summary
Building the Carousel Application
Setting up the Carousel application
Building the JSON file for the Carousel application
Creating the Carousel application with jQuery Cycle
Introducing Bootstrap
Setting up Bootstrap
Bootstrap responsiveness and styles
Summary
Alternate Implementations of JSON
Dependency management
Using composer.json in PHP
Node.js using the package.json registry
JSON for storing application configurations
Configuration in PHP and Python
Configuration in frontend frameworks – Angular 5
Linting with tslint.json
Configuring TypeScript using tsconfig.json
Using package.json and package-lock.json files
Using the angular-cli.json file
JSON for storing application metadata
Metadata in Angular 5
Constants in Node.js
Template embedding
Comparisons with YAML
Summary
Introduction to hapi.js
Basic server setup using JSON
Using JSON metadata and constants
Configuring API using JSON
Configuring a plugin in hapi
Testing the APIs using POSTMAN
Testing hapi server APIs using POSTMAN
JSON beneath POSTMAN
Summary
Storing JSON Documents in MongoDB
Setting up MongoDB
Connecting the hapi app with MongoDB
JSON versus BSON
Collections
MongoDB shell
Inserting a JSON document
Retrieving a JSON document
JSON-based schemas in MongoDB
Summary
Configuring the Task Runner Using JSON
What is a task runner?
Introducing gulp.js
Creating tasks in gulp.js
Writing a unit test
Automation testing
Gulp JSON configuration
Summary
JSON for Real-Time and Distributed Data
Using JSON with Socket.IO
Designing the board
Setting up the Socket.IO server
How Socket.IO works
Setting up the Socket.IO client
Using JSON with Apache Kafka
Setting up Apache Kafka
Implementing Kafka with a Socket.IO application
Implementing the Kafka consumer
Summary
Case Studies in JSON
GeoJSON – a geospatial JSON data format
JSONLD – a JSON format for SEO
BSON – a fast-traversal JSON format
Better compressions with messagePack
Summary
Other Books You May Enjoy
Leave a review - let other readers know what you think
买过这本书的人还买过
读了这本书的人还在读
同类图书排行榜