Chapter One: How does C # get the JSON data back from HTTP? Chapter Two: How does C # parse JSON data? (Deserialization object) Chapter III: How does C # generate a JSON string? (serialized Object) Chapter Fourth: How C # generates a JSON string to submit to an interface (server)?
In the previous article we wrote the C # generated JSON string, then what do we generate the string to do? Of course, the data is submitted to the server. The interface is generally used to accept this JSON.
Here we will use one of the classes in the first chapter. Httpuitls the Post method inside.
Very simple:
public static string Post (String Url, String Data, string Referer);
Parameter description: URL-submitted interface address
Data: Is the JSON string to commit
Referer: File header, give an empty string to it.
OK, come here, the daily use of C # operation JSON is over, is not very simple!
How C # generates a JSON string to submit to an interface (server)