https://learn.microsoft.com/en-us/dotnet/api/system.text.json.jsonserializer.serializetoutf8bytes?view=net-10.0
JsonSerializer.SerializeToUtf8Bytes Method (System.Text.Json) | Microsoft Learn
Converts the provided value into a Byte array.
methodsystemtextjsonmicrosoft