Implement Snak serialization