jxn
jxn (JSON eXplained Notation) is a schema language for JSON — readable definitions with meanings and relations, compiled to JSON Schema.
jxn(JSON eXplained Notation)은 JSON 의 형태와 뜻을 정의하는 언어(스키마 언어)다. 정의는 .jxn 으로 적고, 인스턴스는 평범한 JSON 으로 쓴다. 키 하나를 보면 무엇인가(뜻) · 무엇이 들어가나(타입 · 허용 값) · 누가 채우고 읽나 · 다른 키와 어떻게 이어지나(관계) 가 한 자리에 나온다.
읽는 법 (0.3).jxn 파일과 jxn doc 페이지를 읽는 사람을 위해 -- 한 파일 따라 읽기와 표기 사전
명세 (0.3)만드는 사람을 위한 정확한 규칙 -- 줄 · 구성 · JSON Schema 대응 · 오류
GitHub파서 · jxn build · jxn doc · 예시 · 바뀐 것
{ // 주문 하나
"id": string, // 주문 번호
"items": [ Item ] min 1, // 담은 상품
"total": number, // 합계 금액
derived-from items[*].price // 담은 상품 값의 합
"method": "card" | "cash" // 결제 방법
}git clone https://github.com/AidanPark/jxn.git && cd jxn && npm install && npm run build
node dist/cli.js build order.jxn -o order.schema.json # JSON Schema 2020-12
node dist/cli.js doc order.jxn --example order.json -o order.html # 읽는 페이지 (html 한 파일)