일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | |||||
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |
31 |
- docker
- nodejs
- gradle
- gson
- VSCode
- react
- Windows
- JPA
- Java
- database
- MySQL
- useEffect
- log4j2
- dbeaver
- JavaScript
- springboot
- LOG4J
- Git
- nginx
- Kubernetes
- Linux
- sapfiorielements
- tibero
- IntelliJ
- mybatis
- SAP
- BPMN
- NCP
- Spring
- maven
- Today
- Total
목록JSON (2)
두 손끝의 창조자
function moveElementInJson(json, sourceId, destinationId, newIndex) { // 복제된 JSON 생성 const updatedJson = JSON.parse(JSON.stringify(json)); // 소스 요소 찾기 const sourceElement = findElementById(updatedJson, sourceId); if (!sourceElement) { console.error('Source element not found.'); return null; } // 소스 요소를 제거 const removedElement = removeElementById(updatedJson, sourceId); // 대상 위치에 요소 삽입 co..
Map에 Key가 abc01 이고 Object 필드의 필드명이 abc_01 일 때 서로 매핑 가능하도록 하려면 매핑전략을 정의해야한다. Gson gson = new GsonBuilder() .setFieldNamingStrategy(f -> concatUnderscoredIndex(f.getName())) .create(); String concatUnderscoredIndex(String str) { if (str == null) return null; if (!str.contains("_")) return str; int i = str.lastIndexOf("_"); if (i == 0) return str; String prefix = str.substring(0, i); String suffix ..