parse user data not from a HTML FORM

Sample POST.c and POST2.c explain how to parse user data from a HTML FORM. However, I am require to parse any POST with user data send via an app instead of HTML FORM. I am given the variable names of the user data but this user data is either json encode or xml encode. I am trying to get the developer of the app to send these user data url-encode.

My question is, how do I parse these user data? And how do I return a http POST RESPONSE?