GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||
GeezerVison is showing javaee.github.io — Introduction to JSON
Introduction to JSONJSON is a text-based data exchange format derived from JavaScript that is used in web services and other connected applications. The following sections provide an introduction to JSON syntax, an overview of JSON uses, and a description of the most common approaches to generate and parse JSON. The following topics are addressed here: JSON SyntaxJSON defines only two data structures: objects and arrays. An object is a set of name-value pairs, and an array is a list of values. JSON defines seven value types: string, number, object, array, true, false, and null. The following example shows JSON data for a sample object that contains
name-value pairs. The value for the name
JSON has the following syntax.
Uses of JSONJSON is often used as a common format to serialize and deserialize data in applications that communicate with each other over the Internet. These applications are created using different programming languages and run in very different environments. JSON is suited to this scenario because it is an open standard, it is easy to read and write, and it is more compact than other representations. RESTful web services use JSON extensively as the format for the data inside requests and responses. The HTTP header used to indicate that the content of a request or a response is JSON data is
JSON representations are usually more compact than XML representations because JSON does not have closing tags. Unlike XML, JSON does not have a widely accepted schema for defining and validating the structure of JSON data. Generating and Parsing JSON DataFor generating and parsing JSON data, there are two programming models, which are similar to those used for XML documents.
There are many JSON generators and parsers available for different programming languages and environments. JSON Processing in the Java EE Platform describes the functionality provided by the Java API for JSON Processing (JSR 374).
Copyright © 2017, Oracle and/or its affiliates. All rights reserved.
| |||||||
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |