본문 바로가기

json

(3)
[Gson] String => Object Array 활용하기 LabellingDataVO 객체로 파씽 해주기 아래 객체 배열을 파씽을 해보자. String patJson = "[" + " {\"icType\":1,\"color\":\"#5ba1e0\",\"patSeq\":9766,\"icCode\":1,\"wordNm\":\"혜택\"}" + " ,{\"icType\":1,\"color\":\"#5ba1e0\",\"patSeq\":15068,\"icCode\":1,\"wordNm\":\"현명하다\"}" + " ,{\"icType\":1,\"color\":\"#5ba1e0\",\"patSeq\":107560,\"icCode\":1,\"wordNm\":\"맞춤\"}" + "]"; Gson 을 생성 하고 fromJson 에 파씽하고자 하는 문자열과 , 파씽될 타입을 명시..
JSON.stringify( ) JSON.stringify( ) 자바스크립트의 값을 JSON문자열로 반환한다. JSON JSON이란 JavaScript Object Notaion의 약자로, 브라우저와 서버 사이에 오고가는 데이터의 형식이다. JSON.stringify( value, replacer, space ) value value 는 필수이다. json 문자열로 변환할 값이다. 배열, 객체 또는 숫자, 문자 등이 될 수 있다. replacer repacer은 선택이다. 함수 또는 배열이 될 수 있다. 이 값이 null 이거나 제공되지 않으면, 객체의 모든 속성들이 json 문자열 결과에 포함된다. function replacer(key, value) { if (typeof value === ‘string’) { return unde..
차트 만들기 참고 사이트 js.devexpress.com/Demos/WidgetsGallery/Demo/Charts/ColorEachBar/jQuery/Light/ Color Each Bar Differently - DevExtreme Charts: jQuery Widgets by DevExpress As the Chart assigns one color to one series by default, you need to create a separate series for each bar to color bars differently. For this, employ a series template. Choose a data field and assign it to the seriesTemplate | nameFiel..