diff --git a/src/ZiggyCreatures.FusionCache.Serialization.ServiceStackJson/FusionCacheServiceStackJsonSerializer.cs b/src/ZiggyCreatures.FusionCache.Serialization.ServiceStackJson/FusionCacheServiceStackJsonSerializer.cs index 5df586cd..53762158 100644 --- a/src/ZiggyCreatures.FusionCache.Serialization.ServiceStackJson/FusionCacheServiceStackJsonSerializer.cs +++ b/src/ZiggyCreatures.FusionCache.Serialization.ServiceStackJson/FusionCacheServiceStackJsonSerializer.cs @@ -22,9 +22,7 @@ static FusionCacheServiceStackJsonSerializer() public byte[] Serialize(T? obj) { using var stream = new MemoryStream(); - JsonSerializer.SerializeToStream(obj, stream); - return stream.ToArray(); } @@ -32,7 +30,6 @@ public byte[] Serialize(T? obj) public T? Deserialize(byte[] data) { using var stream = new MemoryStream(data); - return JsonSerializer.DeserializeFromStream(stream); }