Trying to get an object out of str1=X&str2=Y using Newtonsoft.Json
Getting: "Unexpected character encountered while parsing value: s. Line 1, position 1."
Am i way off expecting this to work?
public class MyTest
{
public string str1 { get; set; }
public string str2 { get; set; }
}
public MyTest GetJson()
{
data = "str1=X&str2=Y";
JsonSerializerSettings jss = new JsonSerializerSettings();
jss.MissingMemberHandling = MissingMemberHandling.Error;
jss.ObjectCreationHandling = ObjectCreationHandling.Reuse;
MyTest myTest = JsonConvert.DeserializeObject<MyTest>(data, jss);
}