json解析json解析json解析

解析json出错 Expected BEGIN_ARRAY but was STRING at line 1 column 861 不知道怎么解析 这是返回的json:
[{"Id":4,"ProductCode":"W003","ProductName":"智能钱包1号","ProductSName":"智能钱包1号","Description":"沿海银行推出的人民币理财系列产品,主要投资于优质信托融资项目、银行间债券市场的高信用等级债券等金融工具、理财计划、银行存款、承兑汇票等金融产品。期限灵活多选,并通过多种有效投资组合保障投资者的收益稳定可靠","Days":0,"TotalRaisedAmount":0.000000,"HasRaisedAmount":0.000000,"RaisedPercent":0.0,"RaisingStartDate":null,"RaisingEndDate":null,"ActualEstablishDate":null,"ProudctValueDate":null,"ProductDueDate":null,"EstimateCreditableDate":null,"ProductTypeId":2,"ProductTypeName":"IntelligentWallet","GoldExchangeName":"天安金交所","BankName":"沿海银行","BaseAmount":1.000000,"AdditionalAmount":1.000000,"PersonMaxAmount":0.000000,"Remark":null,"TDays":1,"TDaysForRedemption":1,"NearlySevenRate":4.320000,"MaxNearlySevenRate":0.000000,"MinNearlySevenRate":0.000000,"AmountPerMillion":1.150000,"IsNewComerBuy":true,"IsLimitTimeBuy":false,"StartDate":null,"EndDate":null,_"ProfitRule"_:"[{"Lv": 0,"Period": 7,"AmountPerMillion":1.15,"Rate": 4.51},{"Lv": 1,"Period": 15,"AmountPerMillion":1.16,"Rate": 4.52},{"Lv": 2,"Period": 30,"AmountPerMillion":1.17,"Rate": 4.53},{"Lv": 3,"Period": 45,"AmountPerMillion":1.18,"Rate": 4.54},{"Lv": 4,"Period": 60,"AmountPerMillion":1.19,"Rate": 4.55},{"Lv": 5,"Period": 75,"AmountPerMillion":1.20,"Rate": 4.56},{"Lv": 6,"Period": 90,"AmountPerMillion":1.21,"Rate": 4.57},{"Lv": 7,"Period": 120,"AmountPerMillion":1.22,"Rate": 4.58}]","HtmlBuyRule":null,"HtmlRedemptionRule":null,"HtmlProfitRule":null,"HtmlAssetRule":null}
这个是我的bean类:
private int Id;
private String ProductCode;
private String ProductName;
private String ProductSName;
private String Description;
private int Days;
private double TotalRaisedAmount;
private double HasRaisedAmount;
private double RaisedPercent;
private Object RaisingStartDate;
private Object RaisingEndDate;
private Object ActualEstablishDate;
private Object ProudctValueDate;
private Object ProductDueDate;
private Object EstimateCreditableDate;
private int ProductTypeId;
private String ProductTypeName;
private String GoldExchangeName;
private String BankName;
private double BaseAmount;
private double AdditionalAmount;
private double PersonMaxAmount;
private Object Remark;
private int TDays;
private int TDaysForRedemption;
private double NearlySevenRate;
private double MaxNearlySevenRate;
private double MinNearlySevenRate;
private double AmountPerMillion;
private boolean IsNewComerBuy;
private boolean IsLimitTimeBuy;
private Object StartDate;
private Object EndDate;
private List ProfitRule;
private Object HtmlBuyRule;
private Object HtmlRedemptionRule;
private Object HtmlProfitRule;
private Object HtmlAssetRule;
然后错误是出在这一行:
dqlcproductEntityList = gson.fromJson(string, new TypeToken>(){}.getType());
有没有大神知道怎么回事 是不是bean不对 主要看那个ProfitRule错误是Expected BEGIN_ARRAY but was STRING at line 1 column 861

1个回答

 Type type = new TypeToken<ArrayList<NewsItem>>() {
        }.getType();
        mNewsList = gson.fromJson(result, type);
Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问
相关内容推荐