JSON 정리

코드의 들여쓰기와 형식을 정리하며 실행 검증을 대신하지는 않습니다.

입력: 텍스트결과: 텍스트

텍스트 입력

실행하면 결과가 표시됩니다

예제

Format an invoice identifier without changing its digits

입력

{"invoice_id":9007199254740995}

Expected answer

{
  "invoice_id": 9007199254740995
}
문자열 들여쓰기
객체 키 정렬
Off
서식 있음
On
Keep a quoted invoice identifier as a string

입력

{"invoice_id":"9007199254740995"}

Expected answer

JSON
{
    "invoice_id": "9007199254740995"
}
문자열 들여쓰기
객체 키 정렬
Off
서식 있음
On
Convert an annotated JSON5 request policy into strict JSON

Make the formatter's permissive input behavior visible, then check the output with a strict JSON parser.

입력

{ // Request policy
 timeoutMs: 5000,
 retries: 2,
}

Expected answer

JSON
{
    "timeoutMs": 5000,
    "retries": 2
}
문자열 들여쓰기
객체 키 정렬
Off
서식 있음
On
A support ticket with a zero-prefixed identifier

입력

{"ticket":"00123","priority":"high"}

Expected answer

JSON
{
    "ticket": "00123",
    "priority": "high"
}
문자열 들여쓰기
객체 키 정렬
Off
서식 있음
On
An observatory reading with a negative temperature

입력

{"station":"demo-observatory","temperatureC":-12.5,"open":false}

Expected answer

JSON
{
    "station": "demo-observatory",
    "temperatureC": -12.5,
    "open": false
}
문자열 들여쓰기
객체 키 정렬
Off
서식 있음
On
A café menu with Unicode and a decimal price

입력

{"item":"café","price":3.5,"currency":"EUR"}

Expected answer

JSON
{
    "item": "café",
    "price": 3.5,
    "currency": "EUR"
}
문자열 들여쓰기
객체 키 정렬
Off
서식 있음
On
A safe webhook retry policy

입력

{"timeoutMs":5000,"retries":2,"enabled":true}

Expected answer

JSON
{
    "timeoutMs": 5000,
    "retries": 2,
    "enabled": true
}
문자열 들여쓰기
객체 키 정렬
Off
서식 있음
On
An image manifest with a null caption

입력

{"width":640,"height":480,"caption":null}

Expected answer

JSON
{
    "width": 640,
    "height": 480,
    "caption": null
}
문자열 들여쓰기
객체 키 정렬
Off
서식 있음
On
A release note with an embedded newline

입력

{"version":"2.1.0","notes":"Fixed parser\nAdded tests"}

Expected answer

JSON
{
    "version": "2.1.0",
    "notes": "Fixed parser\nAdded tests"
}
문자열 들여쓰기
객체 키 정렬
Off
서식 있음
On
An empty search result

입력

{"results":[],"total":0}

Expected answer

JSON
{
    "results": [],
    "total": 0
}
문자열 들여쓰기
객체 키 정렬
Off
서식 있음
On

관련 도구

코드 정리

작업 참고 자료

원본 기술 문서 보기 (English)