举例说明:要传的数据为
var date = { "name":"lisi", "sex":"nan", "address":"henan" };
import 'dart:convert' as convert;
//转string
String str = convert.jsonEncode(date);
//转json
Map<String, dynamic> date =convert.jsonDecode(str );
举例说明:要传的数据为
var date = { "name":"lisi", "sex":"nan", "address":"henan" };
import 'dart:convert' as convert;
//转string
String str = convert.jsonEncode(date);
//转json
Map<String, dynamic> date =convert.jsonDecode(str );