Gson은 json파일을 객체로 변환할수 있게 해주는 구글 라이브러리이다.
그렇다면 일단 라이브러리를 받아 보자
http://code.google.com/p/google-gson/downloads/detail?name=google-gson-2.2.2-release.zip
Gson을 어떻게 사용하는지 나와있는 google 사이트!
https://sites.google.com/site/gson/gson-user-guide
Gson에 관한 이슈모음 사이트!
http://code.google.com/p/google-gson/issues/detail?id=230
What steps will reproduce the problem?
1. Build a gson with setDateFormat
Date date = new Date();
Gson gson = new GsonBuilder().setDateFormat("MM/dd/yyyy").create();
System.out.println(gson.toJson(date));
What is the expected output? What do you see instead?
Expected is "08/27/2010"
Date results in standard format: "Aug 27, 2010 10:21:32 AM"
이런식으로 자세히 나와있습니다. ^^
'Android > Json' 카테고리의 다른 글
JSonArray를 GSON 을 이용해 ArrayList<Object> 로 변경. (0) | 2014.01.02 |
---|---|
[2] Json 문법 array? object? (0) | 2012.12.06 |
[1] Json 문법 오류 확인 하는 사이트 (0) | 2012.12.05 |