Deserialize JSON to anonymous object

how about dynamics, the fastest way I see is this:

dynamic myObject = JsonConvert.DeserializeObject<dynamic>(output);

decimal Amount = Convert.ToDecimal(myObject.Amount);
string Message = myObject.Message;

Note:
You will need Newtonsoft.json.dll reference

Leave a Comment