JAVA & amp; JSON details, download from the java Official Website

Source: Internet
Author: User

JAVA & JSON details, download from java Official Website
JSON Definition

JSON (JavaScript Object Notation) is a lightweight data exchange format. It is based on a subset of ECMAScript. JSON uses a completely language-independent text format, but it also uses a habit similar to the C language family (including C, C ++, C #, Java, JavaScript, Perl, Python, and so on ). These features make JSON an ideal data exchange language. Easy to read, write, and machine resolution and generation (network transmission rate ).

JSON usage
  • Use JavaScript-based applications, including Browser Extensions and websites

  • Serialized and structured data transmission network connections in JSON format

  • This is mainly used for data transmission between servers and Web applications.

  • Web services and APIs provide public data in JSON format

  • It can be used with modern programming languages

JSON features
  • Easy to read/write JSON

  • Lightweight text-based interchange format

  • Independent Language

JSON syntax rules JSON syntax is a subset of the JavaScript Object Representation syntax.
  • Data in key-value pairs
  • Data is separated by commas (,).
  • Brackets save objects
  • Square brackets Save the Array
JSON name/value pair the format of writing JSON data is: Name/value pair. Name/value pair combination names are written in front (in double quotation marks), value pairs are written in the back (also in double quotation marks), separated by colons:
{"firstName":"Brett","lastName":"McLaughlin","email":"aaaa"}
JSON format supports the following data types:
Type Description
Number Double Precision Floating Point format in JavaScript
String Unicode escape by backslash in double quotation marks
Boolean True or false
Array Ordered sequence of Values
Value It can be a string, a number, true or false (true/false), empty (null), etc.
Object Unordered set key-value pairs
Whitespace Any one-to-one token can be used.
Null Empty

Below

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.