Newtonsoft. Json sets class attributes not serialized, fastjson serialization attributes

Source: Internet
Author: User

Newtonsoft. Json sets class attributes not serialized, fastjson serialization attributes

Reference page:

Http://www.yuanjiaocheng.net/webapi/parameter-binding.html

Http://www.yuanjiaocheng.net/webapi/action-method-returntype.html

Http://www.yuanjiaocheng.net/webapi/web-api-reqresq-format.html

Http://www.yuanjiaocheng.net/webapi/media-formatter.html

Http://www.yuanjiaocheng.net/webapi/webapi-filters.html

1. symptom: the website application pool stops running. The system log is: 1)

Incorrect application name: w3wp.exe, version: 7.5.7601.17514, timestamp: 0x4ce7a5f8
Error Module name: unknown, version: 0.0.0.0, timestamp: 0x00000000
Exception Code: 0xc00000fd
Error offset: 0x36773800
Error process ID: 0x1b0c
Error application startup time: 0x01d2626824b1ea92
Incorrect application path: C: \ Windows \ SysWOW64 \ inetsrv \ w3wp.exe
Error Module path: unknown
Report ID: 54a68ba9-ce54-11e6-aeff-1866dae93909

2)

Question signature:
P1: w3wp.exe
P2: 7.5.7601.17514
P3: 4ce7a5f8
P4 :*****
P5: 1.0.0.0
P6: 5865f074
P7: 72a
P8: 0
P9: System. StackOverflowException
P10:

2. JsonConvert. SerializeObject (o, Formatting. Indented); an error is reported when o is an object. The final error location is

Public Decimal budget
{
Set {_ budget = value ;}
Get {return _ budget ;}
}

Unprocessed System. stackOverflowException Message: "System. stackOverflowException-type unprocessed exceptions occur in ***. 3. Error Analysis: The Newtonsoft method directly reports an error and cannot be debugged. Is Newtonsoft unable to serialize Decimal attributes? 4. Roundabout solution: setting budget cannot be serialized. 5. Kneel down to find a real way to serialize Decimal type attributes

 

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.