refactor: ConverObjToStr use assert to check result. because the old function is same as SerializeAsString.