JavaScript and JSON Essentials

Sai Srinivas Sriparasa

  • 出版商: Packt Publishing
  • 出版日期: 2013-10-26
  • 售價: $1,440
  • 貴賓價: 9.5$1,368
  • 語言: 英文
  • 頁數: 120
  • 裝訂: Paperback
  • ISBN: 1783286032
  • ISBN-13: 9781783286034
  • 相關分類: JavaScript
  • 海外代購書籍(需單獨結帳)

相關主題

商品描述

If you fancy a less verbose data format than CSV or XML, then JSON could be for you. This tutorial will teach you about using JSON with JavaScript for effective local storage or Internet transfers.

Overview

  • Deploy JSON across various domains
  • Facilitate metadata storage with JSON
  • Build a practical data-driven web application with JSON

In Detail

The exchange of data over the Internet has been carried out since its inception. Delimiter-separated lists such as CSV and tag-separated languages such as XML are very popular, yet they are considered to be verbose by a section of developers. JSON (JavaScript Object Notation) is a lightweight text-based code to create objects to transfer data over the Internet. It is a data exchange format that is human-readable (like XML, but without the markup around your actual payload) and its syntax is a subset of the JavaScript language that was standardized in 1999.

JavaScript and JSON Essentials is a step-by-step guide that will introduce you to JSON and help you understand how the lightweight JSON data format can be used in different ways either to store data locally or to transfer data over the Internet. This book will teach you how to use JSON effectively with JavaScript.

This book begins with a brief refresher course on JavaScript before taking you through how JSON data can be transferred via synchronous, asynchronous, and cross-domain asynchronous HTTP calls. JSON is not just about data transfer; this book throws light on the alternate implementations of JSON as well.

You will learn the data types that JavaScript uses and how those data types can be used in JSON. You will go through the concepts of how to create, update, parse, and delete a JSON object. You will also look at the different techniques of loading a JSON file onto a web page, how to use jQuery to traverse through an object, and how to perform access operations. You will also go over a few resources that will make debugging JSON quick and easy.

What you will learn from this book

  • Learn how to work with real-time JSON
  • Transfer JSON data via asynchronous calls
  • Fire cross-domain asynchronous requests
  • Serialize and transmit data
  • Build the Carousel application
  • Understand alternate implementations of JSON
  • Debug JSON quickly and efficiently

Approach

The book follows a tutorial-based approach and will teach you how to work with JSON tools, design JSON objects, and how to use different techniques to handle JSON data.

Who this book is written for

This book is a great resource for developers who would like to learn more about JSON and who wish to apply it in their own projects. It will be useful to have some prior knowledge of HTML and JavaScript to help you understand the concepts covered in this book. Some familiarity with a server-side language such as PHP, C#, or Python would also be beneficial, but this is not compulsory.

商品描述(中文翻譯)

如果你想要一種比 CSV 或 XML 更簡潔的數據格式,那麼 JSON 可能適合你。本教程將教你如何使用 JSON 與 JavaScript 進行有效的本地存儲或互聯網傳輸。

概述

- 在各個領域部署 JSON
- 促進使用 JSON 的元數據存儲
- 使用 JSON 構建實用的數據驅動網頁應用程式

詳細內容

自互聯網誕生以來,數據交換就一直在進行。以分隔符分隔的列表,如 CSV,以及以標籤分隔的語言,如 XML,都是非常流行的,但被部分開發者認為過於冗長。JSON(JavaScript 物件表示法)是一種輕量級的基於文本的代碼,用於創建物件以在互聯網上傳輸數據。它是一種人類可讀的數據交換格式(類似於 XML,但沒有圍繞實際有效負載的標記),其語法是 1999 年標準化的 JavaScript 語言的子集。

《JavaScript 和 JSON 基礎》是一本逐步指南,將介紹 JSON,並幫助你理解輕量級 JSON 數據格式如何以不同方式使用,無論是本地存儲數據還是通過互聯網傳輸數據。本書將教你如何有效地使用 JSON 與 JavaScript。

本書首先簡要回顧 JavaScript,然後介紹如何通過同步、異步和跨域異步 HTTP 調用傳輸 JSON 數據。JSON 不僅僅是數據傳輸;本書還將闡明 JSON 的替代實現。

你將學習 JavaScript 使用的數據類型,以及這些數據類型如何在 JSON 中使用。你將了解如何創建、更新、解析和刪除 JSON 物件的概念。你還將學習將 JSON 文件加載到網頁上的不同技術,如何使用 jQuery 遍歷物件,以及如何執行訪問操作。你還將了解一些資源,使得調試 JSON 變得快速而簡單。

你將從本書中學到的內容

- 學習如何處理實時 JSON
- 通過異步調用傳輸 JSON 數據
- 發送跨域異步請求
- 序列化和傳輸數據
- 構建 Carousel 應用程式
- 理解 JSON 的替代實現
- 快速有效地調試 JSON

方法

本書採用基於教程的方法,將教你如何使用 JSON 工具、設計 JSON 物件,以及如何使用不同技術處理 JSON 數據。

本書的讀者對象

本書是希望深入了解 JSON 並希望在自己項目中應用的開發者的絕佳資源。擁有一些 HTML 和 JavaScript 的先前知識將有助於你理解本書所涵蓋的概念。對 PHP、C# 或 Python 等伺服器端語言的熟悉也會有幫助,但這並不是必需的。