유니티 - JsonUtility로 Json 파싱하기 : (3) 오브젝트 배열 파싱
Unity 전체 링크 JsonUtility로 Json 파싱하기 (1) Json Parsing (2) Json Array Parsing (배열 파싱) (3) Array of Objects in Json Array Parsing (배열 안에 있는 오브젝트 배열 파싱) (4) Json Export (파일 출력, 내보내기) 이전 글에서 사용한 json 배열 중 오브젝트 1개는 아래와 같다. { "id": "0", "date": " 0-00-00", "number": [0,0,0,0,0,0], "bonus": 0 } 이 오브젝트에 다시 오브젝트 배열이 있는 경우를 생각해보자. test 내부에 { int, string, int[] } 오브젝트가 배열로 있다. { "id": "0", "date": " 0-00-00"..
2022. 6. 25.
유니티 - JsonUtility로 Json 파싱하기 : (1) 기본
Unity 전체 링크 JsonUtility로 Json 파싱하기 (1) Json Parsing (2) Json Array Parsing (배열 파싱) (3) Array of Objects in Json Array Parsing (배열 안에 있는 오브젝트 배열 파싱) (4) Json Export (파일 출력, 내보내기) *.json 파일을 파싱하여 출력해보자. 먼저 이번에 파싱할 파일(Lotto1.json)은 아래와 같다. { "id":"1", "date":"2002-12-07", "number":[10,23,29,33,37,40], "bonus":16 } 대한민국에서 로또는 2002년 12월 07일(date)에 1회(id)를 시작하였고, 당첨 번호(number)는 10, 23, 29, 33, 37, 40이..
2022. 5. 29.
리액트 배열을 json으로 분리하기 (react json import)
리액트 전체 링크 FAQ 같은 내용은 웹이 서비스가 되는 도중에 변경될 일이 거의 없다. 따라서 qnaList를 json으로 분리하여 파일로 관리하는 것이 좋다. const qnaList = [ { category: "category1", question: "what is that ? 1", answer: `this is react. 1 1 < 2 hello!! `, }, { category: "category2", question: "what is that ? 2", answer: "this is react. 2", }, { category: "category3", question: "what is that ? 3", answer: "this is react. 3", }, { category: "cat..
2022. 3. 1.