jav*_*Man 9 java websphere json jersey java-ee
我有json发布数据与下面的模板
{
"themeId" : JSONString,
"themeName" : JSONString,
"tables" : [{
"tableName" : JSONString,
"records" : [{
"recordVersion" : JSONString,
"tableItems" : []
}]
}]
}
Run Code Online (Sandbox Code Playgroud)
在Java方面,我有这样的REST API:
@POST
@Path("/{themeId}")
@Consumes({MediaType.APPLICATION_JSON})
public Response postTheme( @PathParam("themeId") String themeId, ThemeDictionary dictionary) throws InterruptedException {
//code to handle
}
Run Code Online (Sandbox Code Playgroud)
当发布数据小于2 MB但如何处理大于2 MB的数据大小时,它工作正常.
问题
1)我应该加入分页.
2)如果我把json分成两半,那么每一半都不是有效的json.那么,我应该接受字符串并在服务器端连接吗?
3)是否有任何好的例子来处理这种情况
4)寻找可以处理大小小于或大于2 MB的json数据的方法
| 归档时间: |
|
| 查看次数: |
3423 次 |
| 最近记录: |