在Dart中使用JSON.decode時,我收到了這個異常。任何想法如何解決這個問題?使用JSON.decode的異常
message:Class'List'沒有實例方法'codeUnitAt'。
這裏是它試圖解碼JSON數據:
[{_index:供應遞減指數,_type:供應遞減,_id:AVWeP5ZymMsGSnzRy9Kg,_score:0.37158427,_source:{名:test 3,description:test bdrwf,uom:EA,ipn:1412341,mpn:1234124,fireBaseKey:{description:test bdrwf,ipn:1412341,mpn:1234124,name:Test 3,uom:EA}},{ _index:supply-desc-index,_type:supply-desc,_id:AVWeQ_56mMsGSnzRy9NG,_score:0.37158427,_source:{name:Test,description:test 524,uom:EA,ipn:42141,mpn:124124,fireBaseKey:{description :test 524,ipn:42141,mpn:124124,name:Test,uom:EA}}},{_index:supply-desc-index,_type:supply-desc,_id:1,_sc ore:0.19178301,_source:{name:Test 3,description:test bdrwf,uom:EA,ipn:1412341,mpn:1234124,fireBaseKey:{description:test bdrwf,ipn:1412341,mpn:1234124,name:Test 3, uom:EA}}},{_index:supply-desc-index,_type:supply-desc,_id:AVWeP6FsmMsGSnzRy9Kh,_score:0.19178301,_source:{name:Test 3,description:test bdrwf,uom:EA,ipn:1412341 ,MPN:1234124,fireBaseKey:{說明:測試bdrwf,IPN:1412341,MPN:1234124,名稱:測試3,計量單位:EA}}}]
對我來說,錯誤消息表明JSON已經被解碼。 –
謝謝!這是問題。我認爲它還沒有解碼。 – BeatingToADifferentRobot