jersey web service json utf-8 encoding

后端 未结 7 2055
执笔经年
执笔经年 2020-12-08 00:28

I made a small Rest webservice using Jersey 1.11. When i call the url that returns Json, there are problems with the character encoding for non english characters. The corre

7条回答
  •  天涯浪人
    2020-12-08 00:49

    if @Produces(MediaType.APPLICATION_JSON + ";charset=utf-8") does not function, then try:

    @Produces("application/json;charset=utf-8")

    in theory it is the same, but the first option did not work to me

提交回复
热议问题