轉換物件為 JSON 格式
此方法會把物件轉成 JSON 格式,通常用於測試時印出回傳或錯誤的資訊,方便檢查。
命名空間: Ede.Uofx.OpenApi.Sdk.NetStd.Service
方法名稱: UofxService.Json.Convert
try{
...
}catch(Exception e){
var model = UofxService.Error.ConvertToModel(e);
// 將 model 轉成 json 格式印出
Console.WriteLine(UofxService.Json.Convert(model));
}