Files
SnapOtter/apps/docs/ko/tools/files/json-xml.md
T
SnapOtterandGitHub 4963ab3bbd feat(docs-i18n): translate all documentation into 20 languages
All 181 docs markdown files translated into 20 languages (apps/docs/<locale>/**). Companion to the i18n code PR; admin-merged because the file count exceeds GitHub's per-PR CI trigger limit. Validated by pnpm i18n:check (all surfaces, 0 stale/missing) and a clean all-locale docs build.
2026-07-11 13:52:47 +08:00

1.8 KiB

description, i18n_source_hash, i18n_provenance, i18n_output_hash
description i18n_source_hash i18n_provenance i18n_output_hash
JSON과 XML 간 양방향 변환. b3a6ded0c64a human 423ba4cd5d09

JSON to XML

JSON과 XML 형식 간에 양방향으로 변환합니다. JSON 파일을 업로드하여 XML을 얻거나, XML 파일을 업로드하여 JSON을 얻으세요.

API 엔드포인트

POST /api/v1/tools/files/json-xml

JSON 또는 XML 파일과 JSON settings 필드가 포함된 multipart form data를 받습니다.

매개변수

매개변수 유형 필수 기본값 설명
pretty boolean 아니요 true 들여쓰기와 함께 출력을 보기 좋게 출력

요청 예시

JSON to XML:

curl -X POST http://localhost:1349/api/v1/tools/files/json-xml \
  -H "Authorization: Bearer si_your-api-key" \
  -F "file=@config.json" \
  -F 'settings={"pretty": true}'

XML to JSON:

curl -X POST http://localhost:1349/api/v1/tools/files/json-xml \
  -H "Authorization: Bearer si_your-api-key" \
  -F "file=@config.xml" \
  -F 'settings={"pretty": true}'

응답 예시

{
  "jobId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "downloadUrl": "/api/v1/download/a1b2c3d4-e5f6-7890-abcd-ef1234567890/config.xml",
  "originalSize": 850,
  "processedSize": 1200
}

참고 사항

  • 변환 방향은 입력 파일 확장자로 자동 감지됩니다: .json.xml을 생성하고, .xml.json을 생성합니다.
  • pretty 매개변수는 양방향 모두에 적용됩니다. false일 때 출력은 들여쓰기 없이 간결합니다.
  • XML 속성과 중첩 구조는 왕복 변환 시 가능한 한 유지됩니다.