json.net has key method?

后端 未结 3 776
野性不改
野性不改 2020-12-07 16:19

If my response has key \"error\" I need to process error and show warning box.

Is there \"haskey\" method exists in json.net? Like:

var x= JObject.P         


        
3条回答
  •  离开以前
    2020-12-07 16:36

    JObject.ContainsKey(string propertyName) has been made as public method in 11.0.1 release

    Documentation - https://www.newtonsoft.com/json/help/html/M_Newtonsoft_Json_Linq_JObject_ContainsKey.htm

提交回复
热议问题