add follow pom.xml

<dependency>
  <groupId>org.json</groupId>
  <artifactId>json</artifactId>
  <version>20140107</version>
</dependency>

version is 20140107 <-- jdk 6 compiled ...
and higher version is occured error

[useable]
wirte this sentense to  youer controller and define  @ResponseBody anotation 
becouse @ResponseBody =>  noting header and nothing footer  , only body

@RequestMapping(value = "/code/code_get_json", produces="text/plain;charset=UTF-8" ,  method = RequestMethod.GET)
 public @ResponseBody String code_get_json(@RequestParam("cd_pid") String cd_pid){
  ArrayList<CodeVO> codelist   = null ;
  codelist = (ArrayList<CodeVO>)codeService.code_list(cd_pid);
  JSONArray json = new JSONArray(codelist);
  return json.toString();
 }

[refference]
https://github.com/douglascrockford/JSON-java


2014/12/31 11:48 2014/12/31 11:48
받은 트랙백이 없고, 댓글이 없습니다.

댓글+트랙백 RSS :: http://blog.visualp.com/rss/response/659

댓글+트랙백 ATOM :: http://blog.visualp.com/atom/response/659

트랙백 주소 :: 이 글에는 트랙백을 보낼 수 없습니다

트랙백 RSS :: http://blog.visualp.com/rss/trackback/659

트랙백 ATOM :: http://blog.visualp.com/atom/trackback/659