Description
I would love to have support for all formatters to actually deserialize their data into an already existing object if its provided as an additional reference parameter. (if this parameter is null, we could fall back to the current implementation to create the (T)object)
This would additionally help the unity3d implementation (in case you want to serialize unity intern classes / monobehaviors) in a setup there you want to deserialize the data into an already existing object.
This could also help to reduce memory allocations as the data could be restored into already existing field / classes of the provided object.
Something like that? -->
public interface IMessagePackFormatter<T> { bool Deserialize(byte[] bytes, int offset, IFormatterResolver formatterResolver, ref T @object, out int readSize) }