---
title: "JSONFORMAT"
description: "JSONFORMAT SQL \uD568\uC218\uB294 \uB4E4\uC5EC\uC4F0\uAE30\uB97C \uC0AC\uC6A9\uD558\uC5EC JSON \uD14D\uC2A4\uD2B8\uB97C \uBCF4\uAE30 \uC88B\uAC8C \uCD9C\uB825\uD569\uB2C8\uB2E4."
language: ko
source_language: en
translation_state: complete
canonical: https://documentation.invantive.eu/ko/docs/invantive-universalsql/grammar/sql-functions/jsonformat
original: https://documentation.invantive.eu/en/docs/invantive-universalsql/grammar/sql-functions/jsonformat
updated: 2026-12-04T13:52:14Z
license: https://documentation.invantive.eu/ko/
---

## 구문
```mermaid
%%{init: {
  'theme': 'base',
  'flowchart': { 'padding': '7', 'nodeSpacing': '20', 'rankSpacing': '20' },
  'themeVariables': {
    'fontSize': '11px',
    'fontFamily': 'Arial'
  }
}}%%
flowchart LR
    Start((START)) --> JSONFORMAT[JSONFORMAT]:::quoted
    JSONFORMAT --> End((END))
```

## 목적
`JSONFORMAT` SQL 함수는 들여쓰기를 사용하여 JSON 텍스트를 보기 좋게 출력합니다.

참고: [[JSONDECODE]], [[JSONELEMENT]], [[JSONENCODE]] 및 [[XMLFORMAT]].

매개변수:
- Json (`varchar2`): 보기 좋게 출력할 JSON 텍스트입니다.

반환: 보기 좋게 출력된 JSON 텍스트. 입력이 `null`이거나 비어 있는 경우 `null`을 반환합니다.

## 예시
다음 예제는 압축된 JSON 텍스트를 보기 좋게 출력합니다:
```sql
select jsonformat('{"name":"peter","age":21}')

-------------------
{
  "name": "peter",
  "age": 21
}
```
다음 예제는 배열을 포함한 압축된 JSON 텍스트를 보기 좋게 출력합니다. 각 배열 요소는 별도의 줄에 배치됩니다:
```sql
select jsonformat('{"name":"peter","tags":["sql","json"]}')

-------------------
{
  "name": "peter",
  "tags": [
    "sql",
    "json"
  ]
}
```

