String insCode = "f00";
String s = "{"
+ "insCode:"+insCode+","
+ "serviceAmount:22.1,"
+ "netProportion:2.21,"
+ "serIncome:12.1"
+ "}";
在做json解析的时候,报错:Unquotted string 'f00'
因为inscode是字符串,所以在拼接json的时候需要加上‘’,或者转译的""
String insCode = "f00";
String s = "{"
+ "insCode:"+insCode+","
+ "serviceAmount:22.1,"
+ "netProportion:2.21,"
+ "serIncome:12.1"
+ "}";
在做json解析的时候,报错:Unquotted string 'f00'
因为inscode是字符串,所以在拼接json的时候需要加上‘’,或者转译的""