Your json seems not to be correct as discussed in comments. The correct Json will be as follows:
{
"id": "Test",
"Type": "Test",
"ComputerModel": "Testings",
"Properties": {
"Access": "CUSTOMER"
}
}
And using above Json you can parse it using JObject
. req.Query
gives the query string parameters but your json is posted as post body.
var jObject = JObject.Parse(requestBody );
Console.WriteLine(jObject["ComputerModel"].ToObject<string>());
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…