# 使用 Homebrew 安装 json5

查看 json5 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

## 安装

```sh
sudo av install brew:json5
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install json5
```

  证据: local Homebrew formula metadata

## 软件包事实

- **软件包键:** brew:json5
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/json5>
- **版本:** 2.2.3
- **来源摘要:** JSON enhanced with usability features
- **主页:** <https://json5.org/>
- **仓库:** <https://github.com/json5/json5>
- **上游文档:** <https://json5.org/>
- **许可证:** MIT
- **源码归档:** <https://github.com/json5/json5/archive/refs/tags/v2.2.3.tar.gz>
- **已生成:** 2026-08-04T22:13:35+00:00

## 可执行文件

- json5 (cli)
- json5 (别名)

## 依赖

- node

## 安装行为

- post-install 钩子: 未定义
- Bottle: 可用 于 all

## 版本和新鲜度

- 页面生成时间: 2026-08-04
- 管理器版本: 2.2.3
- 本地数据: OK
- 上游仓库: https://github.com/json5/json5
- 检测到的最新版本: v2.2.3 (当前)
- 信息: No package-manager update timestamp was available.
## 项目历史与用法

JSON5 is both a data-format proposal and a JavaScript reference implementation for a more hand-editable superset of JSON. The format adds familiar ECMAScript 5.1 syntax such as comments, trailing commas, single-quoted strings, unquoted object keys, and additional number forms.

### 项目历史

The JSON5 GitHub repository and npm package both date to May 2012. The official site describes JSON5 as `JSON for Humans`, positioning it for configuration and other hand-authored files rather than machine-to-machine interchange.

In March 2018, the JSON5 specification was published as Standard JSON5 1.0.0. The spec frames JSON5 as a superset of JSON that expands syntax with selected ECMAScript 5.1 productions while keeping JSON's data model.

### 采用历史

The official site reported in 2022 that JSON5 received more than 65 million npm downloads per week, ranked in the top 0.1 percent of depended-upon npm packages, and had been adopted by projects including Chromium, Next.js, Babel, Retool, WebStorm, and Apple platforms.

Its wide adoption came less from command-line use than from dependency graphs: parsers, build tools, configuration loaders, and editors pulled JSON5 in as a friendlier format for files people edit by hand.

### 使用方式

The JavaScript package exposes an API compatible with the standard JSON API, including `JSON5.parse()` and `JSON5.stringify()`, and the Homebrew formula provides the `json5` CLI. Typical usage is parsing configuration-like input that wants comments and trailing commas while preserving JSON-like data structures.

### 为什么软件包爱好者会关心

JSON5 is package-nerd significant because it became one of the few JSON-adjacent formats that escaped niche status. It is a reminder that tiny syntax conveniences in configuration files can create enormous dependency footprints once build systems and editors standardize around them.

### 时间线

- 2012-05-27: The GitHub repository was created and npm recorded version 0.0.0.
- 2018-03: Standard JSON5 1.0.0 was published.
- 2021-02-01: GitHub recorded release v2.2.0.
- 2022: The official site reported more than 65 million npm downloads per week and major-project adoption.
- 2022-12-31: GitHub recorded release v2.2.3.

### Related projects

- JSON5 sits beside JSON, YAML, TOML, HJSON, and JSONC as a configuration-oriented data format. Its reference implementation is also related to non-JavaScript ports listed by the JSON5 organization.

### 来源

- <https://formulae.brew.sh/formula/json5>
- <https://github.com/json5/json5>
- <https://json5.org/>
- <https://registry.npmjs.org/json5>
- <https://spec.json5.org/>
- <https://www.npmjs.com/package/json5>


## 安全说明

narrow executable package without higher-risk signals.

- **Geiger 风险:** 绿色 / 低
- narrow executable package without higher-risk signals

## 源数据库详情

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** json5
- **Version Scheme:** 0
- **Revision:** 0
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** stable


## 相关链接

- [Terminal utility packages](https://pkg.so/zh-hans/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://pkg.so/zh-hans/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [Developer build packages](https://pkg.so/zh-hans/developer-build-tools/) - Matched build, compiler, generator, or developer workflow metadata.
- [Networking and protocol packages](https://pkg.so/zh-hans/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [node](https://pkg.so/zh-hans/brew/node/) - Runtime dependency declared by Homebrew.
- [hjson](https://pkg.so/zh-hans/brew/hjson/) - Shares pkgdb curated category or tags: cli, configuration, data-format, developer-tools, json.
- [jsonnet](https://pkg.so/zh-hans/brew/jsonnet/) - Shares pkgdb curated category or tags: cli, configuration, developer-tools, json.
- [go-jsonnet](https://pkg.so/zh-hans/brew/go-jsonnet/) - Shares pkgdb curated category or tags: cli, configuration, developer-tools, json.
- [dyff](https://pkg.so/zh-hans/brew/dyff/) - Shares pkgdb curated category or tags: cli, configuration, developer-tools, json.
- [config-file-validator](https://pkg.so/zh-hans/brew/config-file-validator/) - Shares pkgdb curated category or tags: cli, configuration, developer-tools, json.
- [dhall-json](https://pkg.so/zh-hans/brew/dhall-json/) - Shares pkgdb curated category or tags: cli, configuration, developer-tools, json.
- [xmq](https://pkg.so/zh-hans/brew/xmq/) - Shares pkgdb curated category or tags: cli, data-format, developer-tools, json.
- [jrsonnet](https://pkg.so/zh-hans/brew/jrsonnet/) - Shares pkgdb curated category or tags: cli, configuration, developer-tools, json.
- [json5](https://pkg.so/zh-hans/npm/json5/) - Same normalized package name appears in another local ecosystem. Shared terms: cli, data, json, json5.
- [json5](https://pkg.so/zh-hans/npm/json5/) - Same normalized package name in another local ecosystem.

## Combined YAML source

View the package source record on GitHub. [combined/json5.yml](https://github.com/mxcl/pkgdb/blob/main/combined/json5.yml)


## 来源

- pkg.so package database
- Geiger risk classifier
- package-page enrichment
- curated package history
- package version freshness
- pkgdb category and tag curation
- package relationship graph
- cross-ecosystem install command graph
