Range-based serialization