I\'m defining a PUT request with a JSON request body using libcurl in C.
This how I\'m doing it:
sprintf(jsonObj, \"\\\"name\\\" : \\\"%s\\\", \\
libcurl will send exactly the bytes you ask it to send. It has no knowledge of JSON at all.
See @Lukasa's excellent and more elaborate answer for better and more details.