Files
SnapOtter/apps/docs/ko/tools/files/yaml-json.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

56 lines
1.7 KiB
Markdown

---
description: "YAML과 JSON 간 양방향 변환을 수행합니다."
i18n_source_hash: acf8ca21ee99
i18n_provenance: human
i18n_output_hash: c24cc0d2741c
---
# YAML / JSON {#yaml-json}
YAML과 JSON 형식 간 양방향 변환을 수행합니다. YAML 파일을 업로드하면 JSON을 얻고, JSON 파일을 업로드하면 YAML을 얻습니다.
## API 엔드포인트 {#api-endpoint}
`POST /api/v1/tools/files/yaml-json`
YAML 또는 JSON 파일이 포함된 multipart form data를 받습니다. settings 필드는 필요하지 않습니다.
## 매개변수 {#parameters}
이 도구에는 구성 가능한 매개변수가 없습니다. 변환 방향은 입력 파일 확장자에 따라 결정됩니다.
## 요청 예시 {#example-request}
YAML을 JSON으로:
```bash
curl -X POST http://localhost:1349/api/v1/tools/files/yaml-json \
-H "Authorization: Bearer si_your-api-key" \
-F "file=@config.yaml"
```
JSON을 YAML로:
```bash
curl -X POST http://localhost:1349/api/v1/tools/files/yaml-json \
-H "Authorization: Bearer si_your-api-key" \
-F "file=@config.json"
```
## 응답 예시 {#example-response}
```json
{
"jobId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"downloadUrl": "/api/v1/download/a1b2c3d4-e5f6-7890-abcd-ef1234567890/config.json",
"originalSize": 620,
"processedSize": 780
}
```
## 참고 사항 {#notes}
- 변환 방향은 입력 파일 확장자에서 자동으로 감지됩니다. `.yaml` 또는 `.yml`은(는) `.json`을(를) 생성하고, `.json`은(는) `.yaml`을(를) 생성합니다.
- `.yaml``.yml` 확장자 모두 허용됩니다.
- 다중 문서 YAML 파일에서는 첫 번째 문서만 변환됩니다. `---`로 구분된 추가 문서는 무시됩니다.