JavaScript and JSON Essentials - Second Edition

Use JSON for building web applications with technologies like HTML, JavaScript, Angular, Node.js, Hapi.js, Kafka, socket.io, MongoDB, Gulp.js, and handlebar.js, and others formats like GEOJSON, JSON-LD, MessagePack, and BSON.
Preview in Mapt

JavaScript and JSON Essentials - Second Edition

Bruno Joseph D'mello, Sai Srinivas Sriparasa
New Release!

Use JSON for building web applications with technologies like HTML, JavaScript, Angular, Node.js, Hapi.js, Kafka, socket.io, MongoDB, Gulp.js, and handlebar.js, and others formats like GEOJSON, JSON-LD, MessagePack, and BSON.
Mapt Subscription
FREE
$29.99/m after trial
eBook
$16.80
RRP $23.99
Save 29%
Print + eBook
$29.99
RRP $29.99
What do I get with a Mapt Pro subscription?
  • Unlimited access to all Packt’s 5,000+ eBooks and Videos
  • Early Access content, Progress Tracking, and Assessments
  • 1 Free eBook or Video to download and keep every month after trial
What do I get with an eBook?
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with Print & eBook?
  • Get a paperback copy of the book delivered to you
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with a Video?
  • Download this Video course in MP4 format
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
$0.00
$16.80
$29.99
$29.99 p/m after trial
RRP $23.99
RRP $29.99
Subscription
eBook
Print + eBook
Start 14 Day Trial

Frequently bought together


JavaScript and JSON Essentials - Second Edition Book Cover
JavaScript and JSON Essentials - Second Edition
$ 23.99
$ 16.80
Learning JavaScript Data Structures and Algorithms - Third Edition Book Cover
Learning JavaScript Data Structures and Algorithms - Third Edition
$ 35.99
$ 25.20
Buy 2 for $34.30
Save $25.68
Add to Cart

Book Details

ISBN 139781788624701
Paperback226 pages

Book Description

JSON is an established and standard format used to exchange data. This book shows how JSON plays different roles in full web development through examples. By the end of this book, you'll have a new perspective on providing solutions for your applications and handling their complexities.

After establishing a strong basic foundation with JSON, you'll learn to build frontend apps by creating a carousel. Next, you'll learn to implement JSON with Angular 5, Node.js, template embedding, and composer.json in PHP. This book will also help you implement Hapi.js (known for its JSON-configurable architecture) for server-side scripting.

You'll learn to implement JSON for real-time apps using Kafka, as well as how to implement JSON for a task runner, and for MongoDB BSON storage. The book ends with some case studies on JSON formats to help you sharpen your creativity by exploring futuristic JSON implementations. By the end of the book, you'll be up and running with all the essential features of JSON and JavaScript and able to build fast, scalable, and efficient web applications.

Table of Contents

Chapter 1: 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
Summary
Chapter 2: The JSON Structures
Inserting external JavaScript
Accessing objects in JSON
Performing complex operations
Modifying JSON
Summary
Chapter 3: AJAX Requests with JSON
Basic web operations
Requirements for AJAX
Hosting JSON
Making your first AJAX call
Parsing JSON data
Summary
Chapter 4: 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
Summary
Chapter 5: Debugging JSON
Using the developer tools
Validating JSON
Formatting JSON
Summary
Chapter 6: Building the Carousel Application
Setting up the Carousel application
Building the JSON file for the Carousel application
Introducing Bootstrap
Summary
Chapter 7: Alternate Implementations of JSON
Dependency management
JSON for storing application configurations
JSON for storing application metadata
Comparisons with YAML
Summary
Chapter 8: 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
Summary
Chapter 9: Storing JSON Documents in MongoDB
Setting up MongoDB
Connecting the hapi app with MongoDB
JSON versus BSON
Inserting a JSON document
Retrieving a JSON document
JSON-based schemas in MongoDB
Summary
Chapter 10: Configuring the Task Runner Using JSON
What is a task runner?
Introducing gulp.js
Creating tasks in gulp.js
Automation testing
Gulp JSON configuration
Summary
Chapter 11: JSON for Real-Time and Distributed Data
Using JSON with Socket.IO
Using JSON with Apache Kafka
Summary
Chapter 12: 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

What You Will Learn

  • Use JSON to store metadata for dependency managers, package managers, configuration managers, and metadata stores
  • Handle asynchronous behavior in applications using callbacks, promises, generators, and async-await functions
  • Use JSON for Angular 5, Node.js, Gulp.js, and Hapi.js
  • Implement JSON as BSON in MongoDB
  • Make use of JSON in developing automation scripts
  • Implement JSON for realtime using socket.io and distributed systems using Kafka

Authors

Table of Contents

Chapter 1: 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
Summary
Chapter 2: The JSON Structures
Inserting external JavaScript
Accessing objects in JSON
Performing complex operations
Modifying JSON
Summary
Chapter 3: AJAX Requests with JSON
Basic web operations
Requirements for AJAX
Hosting JSON
Making your first AJAX call
Parsing JSON data
Summary
Chapter 4: 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
Summary
Chapter 5: Debugging JSON
Using the developer tools
Validating JSON
Formatting JSON
Summary
Chapter 6: Building the Carousel Application
Setting up the Carousel application
Building the JSON file for the Carousel application
Introducing Bootstrap
Summary
Chapter 7: Alternate Implementations of JSON
Dependency management
JSON for storing application configurations
JSON for storing application metadata
Comparisons with YAML
Summary
Chapter 8: 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
Summary
Chapter 9: Storing JSON Documents in MongoDB
Setting up MongoDB
Connecting the hapi app with MongoDB
JSON versus BSON
Inserting a JSON document
Retrieving a JSON document
JSON-based schemas in MongoDB
Summary
Chapter 10: Configuring the Task Runner Using JSON
What is a task runner?
Introducing gulp.js
Creating tasks in gulp.js
Automation testing
Gulp JSON configuration
Summary
Chapter 11: JSON for Real-Time and Distributed Data
Using JSON with Socket.IO
Using JSON with Apache Kafka
Summary
Chapter 12: 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

Book Details

ISBN 139781788624701
Paperback226 pages
Read More

Read More Reviews

Recommended for You

Learning JavaScript Data Structures and Algorithms - Third Edition Book Cover
Learning JavaScript Data Structures and Algorithms - Third Edition
$ 35.99
$ 25.20
Building Web and Mobile ArcGIS Server Applications with JavaScript - Second Edition Book Cover
Building Web and Mobile ArcGIS Server Applications with JavaScript - Second Edition
$ 39.99
$ 28.00
JavaScript (and jQuery) in 7 Days [Video] Book Cover
JavaScript (and jQuery) in 7 Days [Video]
$ 124.99
$ 106.25
Learning JavaScript Data Structures and Algorithms - Second Edition Book Cover
Learning JavaScript Data Structures and Algorithms - Second Edition
$ 35.99
$ 25.20
The Complete JavaScript Developer: A Primer to Full Stack JS [Video] Book Cover
The Complete JavaScript Developer: A Primer to Full Stack JS [Video]
$ 71.99
$ 61.20
Mastering pfSense - Second Edition Book Cover
Mastering pfSense - Second Edition
$ 39.99
$ 28.00