asp .net core 5.0 mvc jsonserializer.deserialize to dynamic Edit

Murugan Andezuthu Dharmaratnam | 11 March 2021 | 82

Is it possible to return a dynamic object from a json deserialization using System.Text.Json JsonSerializer.Deserialize? I would like to do something like this dynamic retval = JsonConvert.Deserialize(json)

Solution

var response2 = JObject.Parse(jsonString);