The background is unable to receive data when sending JSON format data requests to WEBAPI using fiddler software today
Let's start with a description of what serialization
- Serialization: The process of converting a data structure or object into a binary string
- Deserialization: The process of converting a binary string generated during serialization into a data structure or object
Test one: The serializable class specific request is as follows:
(1) service-side code:
[HttpPost] Public string Post (AA value) { return value. LoginName; }
(2) class
Public class AA { publicstringgetset;} Public string Get Set ; } }
Request
Results
If the Class AA is serialized
As follows:
[Serializable] Public class AA { publicstringgetset;} Public string Get Set ; } }
The result: Returns an empty
Workaround to submit data in a form format instead of sending data in JSON format
Test as follows:
Results:
C # WEBAPI----H5_app Background production (3)--serialized classes cannot receive JSON-formatted data