enter image description here这是我在解码json时通过通知获得的json响应,我得到了一个错误
我尝试的方法
var data = message.data;
Map<String, dynamic> data1 = json.decode(data);
the error I got on json.decode(data);
The argument type 'Map<String, dynamic>' can't be assigned to the parameter type 'String'
1条答案
按热度按时间lymnna711#
从此处检查Json格式jsonlint.com是否一切正常
然后使用这个站点json_to_dart构建您的模型,fromJson和toJson方法