I am passing following json in request body
{
"areaId": "1",
"cat": "2",
"subcat": "41",
"location": "1100",
"sublocation": "11001",
"briefDescription": "thissss is brief description",
"detailedDescription": "this is detailed obj",
"images": {
"image1": "base64 string",
"image2": "base64 string"
}
}
and my handler looks like this
[HttpPost]
public HttpResponseMessage Post(Dictionary<string,object> data)
{
int areaId = Int32.Parse(data["areaId"].ToString()); //this is how i am getting area from it
return Request.CreateResponse(HttpStatusCode.OK, new { some objects to return });
}
how can I extract the images from this json in a dictionary? and what will be the efficient way of doing this
image1andimage2fields?Dictionary? You should be binding to an object containing properties that match the data you sending