.ApiClient.Model.Rate cannot be serialized because

2020-05-08 07:37发布

I getting the following error, How can i solve this?

ApiClient.Model.Rate cannot be serialized because it does not have a parameterless constructor.

I think its giing while serializing but i trid issue was not resolved, please let me know how to solve this.

public List<Rate> GetRates(string FromCountry, string FromZip, string ToCountry, string ToCity, string ToState, string ToZip, int PackWeight)
        {
            List<Rate> result = null;
            try
            {
                try
                {
                    result = apiInstance.Rates(apiKey);
                }
                catch (Exception e)
                {

                    GetServiceError(e, "RatesApi.Rates");
                }
            }
            catch (Exception ex)
            {
                WebMethodResult = ex.Message;
            }
            return result;
        }

0条回答
登录 后发表回答