I have a JObject, and I would like to set a property from a strongly typed object on it.
JObject["ProductionVersion"] = new ProductionVersion();
To do this, ProductVersion must be converted to a JToken. How can I do this without having to serialize and deserialize an object as a JObject?
JObject["ProductVersion"] = JsonConvert.DeserializeObject<JObject>(JsonConvert.SerializeObject(message.ProductVersion))
Alex spence
source share