Issue with JSON null handling in Newtonsoft
问题 I have an issue with null handling when dealing Newtonsoft.json . I want to check the result is null or not. Based on that I want to handle some condition. My code is as below: try { var response = GetApiData.Post(_getApiBaseUrl, data.ToString()); var jsonString = response.ResultString; var jsonContent = JObject.Parse(jsonString); if (jsonContent["User"] != null) // <-- null handling { var user = JToken.Parse(jsonContent["User"].ToString()); membershipUser = GetMembershipUser(user); } } The