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
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