GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - tailscale/hujson: HuJSON: JSON for Humans (JWCC: JSON w/ comments and trailing commas)

BranchesTags
Open more actions menu

Latest commit

 

History

39 Commits
39 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
cmd/hujsonfmt
cmd/hujsonfmt
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
find.go
find.go
 
 
find_test.go
find_test.go
 
 
format.go
format.go
 
 
format_test.go
format_test.go
 
 
fuzz_test.go
fuzz_test.go
 
 
go.mod
go.mod
 
 
go.sum
go.sum
 
 
go.work
go.work
 
 
json_test.go
json_test.go
 
 
pack.go
pack.go
 
 
parse.go
parse.go
 
 
patch.go
patch.go
 
 
patch_test.go
patch_test.go
 
 
standard.go
standard.go
 
 
types.go
types.go
 
 
types_test.go
types_test.go
 
 

Repository files navigation

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
    }
}]

About

HuJSON: JSON for Humans (JWCC: JSON w/ comments and trailing commas)

Resources

Readme
BSD-3-Clause license

Code of conduct

Code of conduct

Security policy

Security policy
Activity
Custom properties

Stars

903 stars

Watchers

33 watching

Forks

40 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.