🔑

Json Serialize - Deserialize

TechnologyC#
Editor of the PageLatif 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>();