json2 json을 flat(parameter-delimiter)파일로 변환하기(json 파싱) json을 flat파일로 변환하기 위해서 json을 map을 통해 파싱해야한다. json flatter library를 추가한다. https://mvnrepository.com/artifact/com.github.wnameless/json-flattener/0.1.0 // https://mvnrepository.com/artifact/com.github.wnameless/json-flattener implementation group: 'com.github.wnameless', name: 'json-flattener', version: '0.1.0' decodedJson.json 파일 정보이다. 이 json파일을 flat파일로 변환할 것이다. { "data": [ { "Names": "Benjamin L.. 2022. 12. 16. [Java] json 파일 읽기, 파싱 -Mac json을 읽기 위해서 build.gradle에 라이브러리를 추가한다. // https://mvnrepository.com/artifact/com.googlecode.json-simple/json-simple implementation group: 'com.googlecode.json-simple', name: 'json-simple', version: '1.1.1' 파일경로 지정 Mac에는 C드라이브가 아닌 Macintosh HD가 있다. json 파일을 읽을 때 아래와 같이 파일 경로를 지정할 수 있으나 에러가 난다. Reader reader = new FileReader("/Macintosh HD/Users/won/Downloads/response.json"); 따라서 경로에 Macintosh HD.. 2022. 12. 13. 이전 1 다음