我正在使用放心 - https://code.google.com/p/rest-assured/wiki/Usage 我的 JsonObject 看起来像这样
{
"id": "12",
"employeeInfo": null,
"employerInfo": null,
"checkDate": 1395093997218,
"netAmount": {
"amount": 70,
"currency": "USD"
},
"moneyDistributionLineItems": [
{
"mAmount": 100,
"employeeBankAccountId": "BankAccount 1"
}
],
}
如何使用 REST-assured POST 将其作为参数的一部分发送?我努力了
given().param("key1", "value1").param("key2", "value2").when().post("/somewhere").then().
body(containsString("OK"));
但这对于具有嵌套值的 HUGE 对象是不可扩展的。有更好的方法吗?