반응형 변환2 JavaScript 객체 변환 toJSON javascript 객체를 JSON 객체로 변환하는 함수.JSON.parse() : JSON 형태 문자열을 자바스크립트 객체로 변환JSON.stringify() : 자바스크립트 객체를 JSON 형슥으로 변환결과값Object {name: "TEST", gender: "Male"} test.html:10{"name":"TEST","gender":"Male"} test.html:11Fri May 10 2013 08:59:51 GMT+0900 (대한민국 표준시) test.html:152013-05-09T23:59:51.036Z test.html:16"2013-05-09T23:59:51.036Z" test.html:17"2013-05-09T23:59:51.036Z" 정말 요즘 javascript, jquery때문.. 2013. 5. 10. Fileld명을 테이블 컬럼명으로 바꾸자 가끔 이런것이 필요할 때가 있다.userId 를 USER_ID 로 바꾸는 기능.public class Test { public static void main(String[] args) throws Exception { String regex = "([a-z])([A-Z])"; String replacement = "$1_$2"; String str = "UserId"; String value = ""; value = str.replaceAll(regex, replacement).toUpperCase(); System.out.println(value); }} 2013. 4. 6. 이전 1 다음 728x90 반응형