First of all, that code won't compile as it is, even if you manage to have it compiled — by adding a
@
at the beginning of string — you would need to just call the property
Message
and get everything you need. What was too difficult in that?
dynamic obj = JsonConvert.DeserializeObject(msdg);
if(obj != null && obj.Message != null) {
var xml = obj.Message;
}
I have an article that covers how to process JSON data in C# using JSON.NET library, please take a look at that article,
From zero to hero in JSON with C#[
^].