Add spec for encoding serialization