public RootObject GetJsonDeserializer(string json) { try { JsonDataSession = (RootObject)JsonConvert.DeserializeObject(json, typeof(RootObject), new JsonSerializerSettings { TypeNameHandling = TypeNameHandling.Auto, NullValueHandling = NullValueHandling.Ignore, MissingMemberHandling = MissingMemberHandling.Ignore, Error = (serializer, err) => { err.ErrorContext.Handled = true; } }); return JsonDataSession; } catch (Exception ex) { return new RootObject(); } }