Skip to content
プロジェクト

概要

HuJSON:人間向けのJSON(JWCC:コメントと末尾カンマに対応したJSON)

開発ツール

この数値の測り方

計測したスター増加

24時間
0
7日間
+6
15日間
+13
1か月
履歴を収集中

期間ごとの純増数です。期間は重複しており、日別の値ではありません。未計測の値は空欄です。スター数は注目度の指標であり、品質の保証ではありません。

HuJSON - "Human JSON" (JWCC)

Go Reference

The github.com/tailscale/hujson package implements the JWCC extension of standard JSON.

The JWCC format permits two things over standard JSON:

  1. C-style line comments and block comments intermixed with whitespace,
  2. allows trailing commas after the last member/element in an object/array.

All JSON is valid JWCC.

For details, see the JWCC docs at:

https://nigeltao.github.io/blog/2021/json-with-commas-comments.html

Formatting with hujsonfmt

hujsonfmt is a program that formats HuJSON files. Install it by running:

go install github.com/tailscale/hujson/cmd/hujsonfmt@latest

Visual Studio Code association

Visual Studio Code supports a similar jsonc (JSON with comments) format. To treat all *.hujson files as jsonc with trailing commas allowed, you can add the following snippet to your Visual Studio Code configuration:

"files.associations": {
    "*.hujson": "jsonc"
},
"json.schemas": [{
    "fileMatch": ["*.hujson"],
    "schema": {
        "allowTrailingCommas": true
    }
}]

関連プロジェクトを探す

読み込み中…