【发布时间】:2015-10-07 14:42:38
【问题描述】:
我使用 JAX-RS 和 Jersey。我有这样的方法。它对我不起作用。
@POST
public Response addOrder(List<Long> ids) {
...
}
当我使用 Postman 发送请求时出现错误。
Can not deserialize instance of java.util.ArrayList out of START_OBJECT token
at [Source: org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream@6befd3c2; line: 1, column: 1]
我的要求:
{
"ids": [1, 2, 3]
}
有没有办法让它工作?
【问题讨论】: