Use updated Encode API for getting/setting policy.