我试图将虚拟的值传递给id,但语法不正确。
String dummy = getSysCodeOfAccount(X_Table, "delivery");
String jsonRollups = [{"id":dummy},{"percentage":"100.000000"}];
答案 0 :(得分:2)
这是正确的json字符串:
String dummy="sample";
String jsonRollups = "{\"id\":\""+dummy+"\",\"percentage\":\"100.000000\"}";