cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kai Liu <kliu....@gmail.com>
Subject Support Chinese Characters in json result for Restful
Date Mon, 27 Oct 2014 20:17:22 GMT
Dear all,

I use cxf to handle the Restful return as following:

@Path("/")
@Produces("text/json")
public class Manager {
@GET
    public String getRequest(@QueryParam("service") String serviceName)
throws IOException{
.....
return myjsonString;
}
}

The myjsonString is

[{"id":{"account":"eucalyptus","user":"zhao6"},"userAccount":"zhao6@eucalyptus","enabled":true,"firstName":"六","lastName":"赵","createDate":"Oct
26, 2014 2:04:56 PM"}]


But When I type the Restful link in the web browser, it shows the
wrong encodings:

[{"id":{"account":"eucalyptus","user":"zhao6"},"userAccount":"zhao6@eucalyptus","enabled":true,"firstName":"鍏�","lastName":"璧�","createDate":"Oct
26, 2014 2:04:56 PM"}]


I am wondering how to support Chinese Characters in json result for Restful


Thanks.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message