C# code to check if a response string is a JSON Object or an XML?
I am trying this :
string responseString = jQuery.parseJSON(response.Content.ReadAsStringAsync().Result);
But this will throw an exception if the result is not a valid JSON object. ( This is returning XML content for me, in some cases) I want to avoid exception handling. Is there any method which returns bool to check if this is valid json or not?