About JSON serialization and deserialization in asp.net (1/4)

Source: Internet
Author: User

Json is a data format specially designed for webpage special effect code running on a webpage in a browser. There are more and more scenarios for using json in website applications. This article introduces the asp tutorial. net json serialization and deserialization, mainly a brief introduction to json, asp.net tutorial on how to serialize and deserialize, processing of date, set, and dictionary in serialization and deserialization.

1. Introduction to json
Json (javascript object notation, javascript object notation) is a lightweight data exchange format.

Json is a set of "name-value pairs. The structure consists of braces '{}', braces '[]', comma ',', colons ':', and double quotation marks '. The data types include object, number, boolean, string, array, and null.

Json has the following forms:

An object is an unordered set of "name-value pairs". An object starts with "{" and ends. Each "name" is followed by one ":". Multiple "name-value pairs" are separated by commas. For example:

Var user = {"name": "Zhang San", "gender": "male", "birthday": "1980-8-8 "}
An array is an ordered set of values. An array starts with "[" and ends with "]" and is separated. For example:

Var userlist = [{"user": {"name": "Zhang San", "gender": "male", "birthday": "1980-8-8 "}}, {"user": {"name": "", "gender": "male", "birthday": "1985-5-8"}];
A string is a collection of any number of unicode characters enclosed by double quotes. It is escaped using a backslash.

1 2 3 4

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.