Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 | 31 |
Tags
- 이미지주소추출
- set foreign_key
- 특정 패키지 업데이트 중지 / 해제
- rsync
- node 이미지 저장
- openfire
- 워드프레스한글팩
- no key alg
- 날짜계산
- MySQL
- 뒤로 가기
- security.limit_extensions
- php
- 중독 게임
- ssmtp
- node.js
- 리플리케이션 오류
- 쁘띠프랑스
- 훼인
- 앞으로 가기
- strtotime
- php-fpm
- mongodb
- simplexml_load_filesimplexml
- 태권v
- 외래키
- 재귀쿼리
- xcache
- 태권브이
- quota
Archives
- Today
- Total
일상 기록 창고
JSON 파싱하기 본문
1. pom.xml 설정
<dependency> <groupId>com.googlecode.json-simple</groupId> <artifactId>json-simple</artifactId> <version>1.1.1</version> </dependency> |
2. 간단사용법
{"msg":"OK","files":[{"sFileName":"s5711487049840.png","sOrgFileName":"4.png","sFileSize":37727, "sFilePath":"\/\/localhost\/kong\/s5711487049840.png","sImage":{"0":994,"1":609,"2":3,"3":"width=\"994\" height=\"609\"","bits":8,"mime":"image\/png"}}]} |
msg 접근해서 가져오기
JSONObject obj = new JSONObject(AccountSendUrl); String isOK = obj.getString("msg").toString(); |
files 접근해서 가져오기
JSONArray arr = obj.getJSONArray("files"); String sFilePath = arr.getJSONObject(0).get("sFilePath").toString(); |
'프로그래밍 > Spring (jsp)' 카테고리의 다른 글
@Configuration 과 @Bean 을 이용한 설정1 (0) | 2017.03.06 |
---|---|
파일업로드 시 했던 일... (0) | 2017.02.14 |
JSTL Form value 처리 방법 (0) | 2017.01.23 |
Error configuring application listener of class org.springframework.web.context.ContextLoaderListener (0) | 2017.01.23 |
null 체크 (0) | 2017.01.09 |