Json Serialize - Deserialize
Technology | C# |
---|---|
Editor of the Page | Latif Bahadır ALTUN |
// with System.Text.Json
var json = JsonSerializer.Serialize(model);
var convertModel = JsonSerializer.Deserialize(json, typeof(ClassificationForestModel));
// or with Newtonsoft.Json
var json = JsonConvert.SerializeObject(model);
// or JTOKEN
JToken token = JToken.Parse(resultJson);
JObject json = JObject.Parse(token.ToString());
var model = json.ToObject<ListGetSensorResultDto>();