JSON to Array C #
I have JSON with these values
{"interface":"ALL",
"dv":"1",
"alarms":[{"Id":0,
"Type":"URL",
"Trigger":"facebook",
"Output":"video"},
{"Id":1,
"Type":"URL",
"Trigger":"twitter",
"Output":"video"},
{"Id":2,
"Type":"URL",
"Trigger":"ebay",
"Output":"video"}
]}
And I would like to parse this information into mi c # code
I am doing this for Strings tags and it works fine
JObject obj = JObject.Parse(json);
String value =(String) obj["dv"];
but I have an error for Array alarms tags. I've tried with:
Array value = null;
value =(Array) obj["alarm"];
but I am getting the error (Message = Cannot convert array to byte array. Source = Newtonsoft.Json).
+1
source to share