I have a situation where I will get some known values from an api in json, but then need to get to a set of unknown values (for instance the password and email error in this json):
{"error":{"httpCode":400,"message":"Invalid parameters"}, "message":{"errors":
{"password":"is too short"
,"email":"is invalid"}}}
I know I will always get 'error' and 'message.errors'. I do not know ahead of time what the tokens/properties will be (password, email)
I am trying to use Json.net to get at them, and just write to a string builder: "password is too short, email is invalid"
JObject root = JObject.Parse(<json string>);
that code gives me root.Properties, but I am doing something wrong, as I don't get properties off it's children. What don't I get?
Thanks,