Serializing tokens