JSON

JSON Schema Validator

JSON 데이터가 JSON Schema(draft-07 스타일)를 준수하는지 검증 — 각 위반 사항의 정확한 경로와 설명 포함.


                        
                    

JSON Schema describes the expected structure of a JSON document — which fields are required, what type they are, and what constraints apply to their values. This tool checks actual data against a schema and shows the exact path to every violation.

How to use it

Common uses

Things to keep in mind

JSON Schema has several versions (draft-07, 2019-09, 2020-12) with small syntax differences — check which version your production validator actually expects.

required only checks that a field is present, not its value — an empty string or null still counts as "present" if the type allows it.

이 도구에 대한 아티클: JSON Schema: JSON 구조를 기술하고 검증하는 방법

자주 묻는 질문

이 JSON Schema 검증 도구는 무엇을 해주나요?

JSON 데이터가 JSON Schema(draft-07 방식)의 규칙을 만족하는지 검사하고, 위반이 있는 모든 지점에 대해 정확한 경로와 이유를 알려줍니다.

검증 오류는 구체적으로 무엇을 의미하나요?

해당 경로의 값이 스키마의 제약 조건을 만족하지 않는다는 뜻입니다. 타입이 잘못되었거나, 필수 속성이 없거나, 패턴이 맞지 않거나, 값이 범위를 벗어난 경우 등이 있습니다.

스키마와 데이터가 서버에서 처리되나요?

아닙니다. 검증은 모두 브라우저의 자바스크립트에서 이루어지며 스키마와 데이터 모두 전송되지 않습니다.

additionalProperties: false는 무엇을 하나요?

기본적으로 객체는 properties에 명시된 필드 외에 어떤 필드든 가질 수 있습니다. additionalProperties: false는 이런 추가 필드를 금지합니다 — 키 이름의 오타나 실수로 남은 debug 필드를 잡아내는 데 유용합니다.

여러 타입을 허용하는 필드를 정의할 수 있나요?

네, type에 배열을 사용하면 됩니다. 예를 들어 필드가 문자열이거나 null일 수 있다면 "type": ["string", "null"]로 정의합니다. 더 복잡한 경우에는 oneOf, anyOf, allOf 키워드를 사용합니다.

아티클: JSON