1. 程式人生 > >fastjson string[]轉 json字串

fastjson string[]轉 json字串

  @RequestMapping(value = "/friendlink_list/province_list", produces = {"application/json;charset=UTF-8"}, method = RequestMethod.GET)
    @ResponseBody
    public String province_list(HttpServletRequest request, HttpServletResponse response) throws IOException {
        FriendLinkService fls = new FriendLinkService();     
       String[] plist 
= fls.getPlist(); String pl = JSONObject.toJSONString(plist); return pl; }