NET 8 – Memory<byte[]> is serialized as base64
Starting with .NET 8, both Memory<byte[]> and ReadOnlyMemory<byte[]> are serialized as Base64 strings. Let’s look at a quick example: In contrast, Memory<int> and the likes will continue to be serialized as JSON arrays.