We have data coming from 3rd party system and I have one class designed like this,
public class CollectionProperty
{
public string Name { get; set; }
public object Value { get; set; }
}
and my VS debugger saying value like this which gives me extra details of data type along with result,
Now when I serialize this using Newtonsoft,
var x = JsonConvert.SerializeObject(resultPacket);
it's giving below output with only value kind and NOT the value.
I need string value with double quote, number value withOUT double quote, how to do this?
[{"Name":"Device ID","Value":{"ValueKind":3}}]},{"Name":"CPU0","CollectionProperties":[{"Name":"CPU Load Percentage","Value":{"ValueKind":4}}]}]
int
. What you posted is JSON, not integers. Since you explicitly wrote that you don't want that payload parsed, the deserializer returned what the input contained, a JToken – Claudicant