I have this API call:
HttpResponse<string> response = Unirest
.get("https://wordsapiv1.p.mashape.com/words/" + word.Name)
.header("X-Mashape-Key", "xxxx")
.header("Accept", "application/json")
.asJson<string>();
For words it retrieve this type of response:
{
"word" : "abandonment",
"results" : [{
"definition" : "withdrawing support or help despite allegiance or responsibility",
"partOfSpeech" : "noun",
"typeOf" : ["disposal", "disposition"],
"hasTypes" : ["throwing away", "discard"],
"derivation" : ["abandon"]
}
],
"syllables" : {
"count" : 4,
"list" : ["a", "ban", "don", "ment"]
},
"pronunciation" : "ʌ'bændʌnmʌnt",
"frequency" : 2.98
}
The pronunciation section with its following key can appear more than once in the response when I try to do this:
RootObject rootObject = JsonConvert.DeserializeObject<RootObject>(response.Body);
How can I remove all occurrences of "pronunciation":"xxx", from response string?
