I have a JSON which basically looks like this:
{
"body":
{
"mode": "raw",
"raw": "{
\"Token\" : \"123123\", \"queryName\" : \"testMethod\" ,\"dataTestToSEND\" :{\"IDs\":[\"B00448MZUW\",\"B071F7LBN6\",\"B01BBZJZHQ\"],\"Marketplace\":\"southAmerica\",\"Region\":\"West\",\"PricingMethod\":0}} "a
},
"description": "some description here"
}
}
And when I converted it to C# object classes I got this:
public class Body
{
public string mode { get; set; }
public string raw { get; set; }
}
public class RootObject
{
public Body body { get; set; }
public string description { get; set; }
}
I used json2csharp tool here..
Now what confuses me here is the "raw" property as you can see.. The tool converted it into a string, but this doesn't really looks like a string to me?
Rather a raw, the way I see it, should be an class which contains something like this:
public class Raw
{
public string Token { get; set; }
public string queryName { get; set; }
public List<string//?not sure which type does this needs to be set to?>
dataTestToSEND { get; set }
public string marketplace { get; set; }
public string Region { get; set }
}
Can someone help me out with this? How can I structure a proper set of classes and objects for this JSON? It's very confusing for me right now...
rawand enclose it inside "", so it is a string.