public object FromJson(string json, Type type) { try { return JsonConvert.DeserializeObject(json, type); } catch (Exception ex) { SetError(ex, true); return null; } }