To further clarify what Christian is saying...
You have to process/parse the POST data yourself. As you
noted - the built-in one only works for form data (x-www-form-urlencoded
or multipart/form-data).
In other words - when the access
handler gets called the first time and you see that it's a POST request,
you can create a post-processor to handle it (similar to the MHD one). I.e., instead of creating one with
the MHD-provided 'create post processor' function (sorry - don't have
the code in front of me), you would create one of your own design. Alternatively and perhaps easier, you could not write a separate 'post processor' and just process the POST data as it comes in on the subsequent 'access handler callback' calls. (I assume that will work, anyway.)
However you parse/gather the POST data... In
your case, I'm guessing you'd just keep it simple and have it collect
all the data from your JSON request into a string (remember - post data
can appear in chunks, not necessarily all in one shot). After all POST data has come in (indicated by an upload data size of 0 ...?), you can do whatever you want with the data/string. If there is some kind of encoding applied to the string, you'll have to parse it into regular text, of course.
If you want to do something really clean/slick, you could have your
'post processor code' parse the JSON into some kind of mapping that you
can just ask for key/value pairs. That way, the code handling the
request doesn't even need to know that it's JSON. Completely optional
from your web server's perspective - it could be perfectly happy to just
hand the string off to somebody else. You can hide the complexity
wherever you want, but it's going to be there somewhere. :)