The following describes that JSON cached data is a lightweight data exchange format. Easy to read and write. It is also easy to parse and generate machines. It is based on a subset of JavaScript Programming Language, Standard ECMA-262 3rd Edition-December 1999.
JSON is constructed in two structures:
A collection of name/value pairs ). In different languages, it is understood as an object), record), structure struct), dictionary), hash table), keyed list ), or the associated array associative array ).
An ordered list of values ). In most languages, it is understood as an array ). These are common data structures. In fact, most modern computer languages support them in some form. This makes it possible to exchange a data format between programming languages that are also based on these structures.
JSON has the following forms:
An object is an unordered set of 'name/value' pairs. An object starts with "{" left parenthesis) and "}" right Parenthesis. Each "name" is followed by a ":" colon), and the "," comma (,) is used to separate the "name/value" pairs.
An array is an ordered set of values. An array starts with "[" Left brackets), and "]" ends with brackets. Values are separated by commas. String) is a set of any number of Unicode characters enclosed by double quotation marks. It is escaped using a backslash. A character) is a separate character string ). String) is very similar to a C or Java string.
Every application is developed to solve problems in a certain field. Each field has its own set of rules and specifications that constrain data. When applications apply these constraints to data, the constraints are verified. All applications need to verify the data entered by the user.
Currently, applications generally use a combination of if-else statements to verify data. These statements contain verification data that is hard-coded by the developer or placed through the server code. Generally, developers use server-side code to avoid minor data changes that may lead to JavaServer PageJSP.
- A full description of the JSON history
- Comparison between JSON and XML
- Details about the number of elements in JSON format that the server code will generate
- Detailed descriptions of server-side JSON Performance
- Typical method for generating JSON metadata objects
You can use JavaScript Object NotationJSON to group and cache metadata, and use JavaScript Functions to access metadata to verify user input. When JavaScript contains scattered metadata, you cannot control how much data is evaluated and how much data is passed to the client. All server code snippets will be evaluated and sent to the server.
However, when using JSON to cache data, you can completely control the amount of metadata sent to the client, because the server code will generate JSON cache data. This helps only send metadata to the client corresponding to the user who sees or inputs the data.
You can also use JSON to cache user input data. After the program caches data, it will erase the data field instead of refreshing the screen, which is similar to Ajax. In this way, you can enter another group of data for the same attribute.