Closed yousunning closed 3 months ago
/* 이력서 복제 시 문자열 " - 복사본" 추가 * 입력: JSON 문자열 * 출력: 수정된 JSON 문자열1 */ public String jsonCloneResume(String json) { final JsonObject jsonObject = JsonParser.parseString(json).getAsJsonObject(); final String newTitle = jsonObject.get("title").getAsString() + " - 복사본"; jsonObject.addProperty("title", newTitle); final Gson gson = new Gson(); final String clonedJson = gson.toJson(jsonObject); return clonedJson; }