When deserialising byte array using Newtonsoft we can achieve by writing the following code
var stringValue = Encoding.UTF8.GetString(byteArray);
T data = JsonConvert.DeserializeObject<T>(stringValue);
But how do you do the equivalent using System.Text.Json? knowing that it is encoding UTF8?
This is a working example of how to deserialize with a byte array of a UTF8 string (using System.Text.Json):
ModelDTO
Output: