I need help with a very simple question. How can I deserialize the json below to a C# bool without creating a wrapping root object. Thanks.
f
{"valid":false}
0
If you are using Json.Net:
string json = @"{""valid"":true}";
var jo = JObject.Parse(json);
bool flag = jo.SelectToken("valid").Value<bool>();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With