Test with JSON like this:
{\"key1\":\"value1\",\"key2\":\"value3\",\"key3\":[\"value4\"],\"key5\":\"value5\"}\n;
invalid arguments exception: 'Newtonsoft.Json.JsonConvert.DeserializeObject>(string)'
This is my code :
string json = "{\"action\":\"recognition\",\"command\":\"event\",\"eventid\":[\"1108\"],\"from_ip\":\"192.168.0.49\",\"user\":\"safetymaster\"}\n";
json = json.Replace("\n", "");
var DeserializedJson= JsonConvert.DeserializeObject<dynamic>(json);
Dictionary<string, string> jsonDic = JsonConvert.DeserializeObject<Dictionary<string, string>>(DeserializedJson);