Argument Exception when creating JObject

The JObject(object) constructor is expecting the object to be either a JProperty, an IEnumerable containing JProperties, or another JObject. Unfortunately, the documentation does not make this clear.

To create a JObject from a dictionary or plain object, use JObject.FromObject instead:

JObject jsonObject = JObject.FromObject(data);

To create a JObject from a JSON string, use JObject.Parse, e.g.:

JObject jsonObject = JObject.Parse(@"{ ""foo"": ""bar"", ""baz"": ""quux"" }");

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)