import org.json.simple.JSONArray;
import org.json.simple.JSONObject;
import org.json.simple.parser.JSONParser;
String jsonStr = (String) paramMap.get("jsonStr");
JSONParser jsonParser = new JSONParser();
Object obj = jsonParser.parse(jsonStr);
JSONObject jsonObject = new JSONObject();
jsonObject = (JSONObject) obj;
JSONArray array = (JSONArray) jsonObject.get("formData");
for( int i=0; i< array.size(); i ++){
JSONObject object = (JSONObject) array.get(i );
System.out.println( object.get("key") );
}
'프로그래밍 > JAVA' 카테고리의 다른 글
날짜관련 util (0) | 2019.03.07 |
---|---|
FCM push 보내기 (0) | 2019.03.07 |
Map을 VO로 변환 (0) | 2019.03.07 |
VO를 Map으로 변환 (0) | 2019.03.07 |
Vo 로그출력 (0) | 2019.03.07 |