首先要晓得json显示的格式,就晓得下面为啥要这样拼接了
1.通过转义符号拼接
String content2 ="{\"order\":{\"terminalNumber\":\""+""+"\""
+ ",\"listFlag\":"+"\""+"0"+"\""
+ ", \"pushMode\":"+"\""+"1"+"\""
+ ",\"managerCardNo\":"+"\""+""+"\""
+ ",\"departmentId\":"+"\""+"9F7E9439CA8B4C60A2FFF3EA3290B088"+"\""
+ ",\"paperInvoiceType\":"+"\""+""+"\""
+ ",\"checker\":"+"\""+"王五"+"\""
+ ",\"invoiceNumEnd\":"+"\""+""+"\""
+ ",\"payee\":"+"\""+"李四"+"\""
+ ",\"buyerAddress\":"+"\""+"杭州市"+"\""
+ ",\"invoiceType\":"+"\""+"1"+"\""
+ ",\"specificFactor\":"+"\""+"0"+"\""
+ ",\"orderNo\":"+"\""+"11111332244"+"\""
+ ",\"machineCode\":"+"\""+""+"\""
+ ",\"vehicleFlag\":"+"\""+"1"+"\""
+ ",\"invoiceCode\":"+"\""+""+"\""
+ ",\"buyerPhone\":"+"\""+"15858585858"+"\""
+ ",\"surveyAnswerType\":"+"\""+""+"\""
+ ",\"invoiceDetail\":[{\"specType\":"+"\""+"y460"+"\""
+ ",\"taxExcludedAmount\":"+"\""+"0.88"+"\""
+ ",\"invoiceLineProperty\":"+"\""+"0"+"\""
+ "