[Document] Json.NET

Source: Internet
Author: User

1.JsonConverter

Simple serialization of an object without other processing

Jsonconverter.serializeobject (object);

2.JsonSerializer

Provides more control over serialization

Serialization of control time of 2.1 dateformathandling

And no YYYY-MM-DD similar format, it seems to be written by myself

2.2 Missingmemberhandling

Processing when there are no attributes in the entity class in JSON

2.3 Referenceloophandling Circular Reference processing

2.4 nullvaluehandling Null value processing

There are two cases in which a property has no value in the serialization process, and there is an attribute in JSON that has no value.

Can be customized by Jsonpropertyattribute

2.5 defaultvaluehandling Default value handling

can be customized

2.6 objectcreationhandling

Controls how objects are generated and deserialized during deserialization

can be customized

2.7 typenamehandling

Typenamehandling controls whether json.net includes. NET type names during serialization with a $type the property and reads. NET type names from the to determine what type to create during deserialization.

The value of the $type property can is customized and validated by creating your own serializationbinder.

2.8 Typenameassemblyformat

The notation of the type name when controlling serialization

Reference links

Http://www.newtonsoft.com/json/help/html/Introduction.htm

[Document] Json.NET

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.