要求に応じて本文を設定するときに、Groovy の HTTPBuilder で JSON-lib の代わりに Jackson を使用できますか?
例:
client.request(method){
uri.path = path
requestContentType = JSON
body = customer
response.success = { HttpResponseDecorator resp, JSONObject returnedUser ->
customer = getMapper().readValue(returnedUser.content[0].toString(), Customer.class)
return customer
}
}
この例では、応答を処理するときに Jackson を使用していますが、要求は JSON-lib を使用していると思います。