# 使用 Homebrew, apk, dnf, MacPorts, Nix, pacman, apt, zypper 安装 json-glib

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

## 安装

```sh
sudo av install brew:json-glib
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install json-glib
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install json-glib
```

  证据: MacPorts ports tree: devel/json-glib/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- apk (92%):

```sh
sudo apk add json-glib
```

  证据: Alpine Linux edge package indexes: json-glib from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz

- dnf (92%):

```sh
sudo dnf install json-glib
```

  证据: Fedora Rawhide package metadata: json-glib from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/210a2053c8e007daf9ae39c2a21daaed9b2ddd07d63ecffa597050361e73650c-primary.xml.zst

- Nix (92%):

```sh
nix profile install nixpkgs#json-glib
```

  证据: nixpkgs package indexes: pkgs/by-name/js/json-glib/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

- pacman (92%):

```sh
sudo pacman -S json-glib
```

  证据: Arch Linux sync databases: json-glib from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz

- Debian apt (92%):

```sh
sudo apt install gir1.2-json-1.0
```

  证据: Debian stable package indexes: gir1.2-json-1.0 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

- zypper (92%):

```sh
sudo zypper install json-glib-devel
```

  证据: openSUSE Tumbleweed package metadata: json-glib-devel from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst

## 软件包事实

- **软件包键:** brew:json-glib
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/json-glib>
- **版本:** 1.10.8
- **来源摘要:** Library for JSON, based on GLib
- **主页:** <https://wiki.gnome.org/Projects/JsonGlib>
- **上游文档:** <https://wiki.gnome.org/Projects/JsonGlib>
- **许可证:** LGPL-2.1-or-later
- **源码归档:** <https://download.gnome.org/sources/json-glib/1.10/json-glib-1.10.8.tar.xz>
- **已生成:** 2026-08-04T22:13:35+00:00

## 可执行文件

- json-glib-format (cli)
- json-glib-validate (cli)
- json-glib-format (别名)
- json-glib-validate (别名)

## 依赖

- gettext
- glib

## 构建依赖

- docutils
- gettext
- gobject-introspection
- meson
- ninja
- pkgconf

## 安装行为

- post-install 钩子: 未定义
- Bottle: 可用 于 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## 版本和新鲜度

- 页面生成时间: 2026-08-04
- 管理器版本: 1.10.8
- 本地数据: OK
- 上游仓库: https://wiki.gnome.org/Projects/JsonGlib
- 信息: No package-manager update timestamp was available.
- 信息: Release/tag comparison is only available for GitHub repositories.
## 项目历史与用法

JSON-GLib is GNOME's GLib/GObject JSON parser and generator library, with small command-line tools for formatting and validating JSON. It matters because it made JSON feel native inside the C/GObject stack used by GTK and GNOME applications.

### 项目历史

JSON-GLib was written by Emmanuele Bassi and is licensed under LGPL-2.1-or-later. The project documentation describes a DOM-like API for parsing and generating JSON plus GObject serialization and deserialization for GLib applications.

Early releases in 2007 established the parser, generator, and GObject deserialization work. Version 0.10.0 added more complete GObject and GBoxed serialization, insertion-order guarantees, and introspection data. Version 1.0 in 2014 stabilized the API generation, bumped the GLib dependency, and added command-line tools for validation and formatting.

### 采用历史

Because JSON-GLib is part of the GNOME platform stack, it is packaged broadly across Linux distributions and also appears in Homebrew, MacPorts, Nix, and other package managers. Its GObject Introspection support made the same JSON library available to language bindings, not only to C applications.

### 使用方式

Developers link against `json-glib-1.0`, include `json-glib/json-glib.h`, and use parser, generator, builder, reader, object, array, and node APIs. Packagers also ship `json-glib-format` and `json-glib-validate`, which provide quick command-line formatting and validation.

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

JSON-GLib is the package that tells you a desktop stack has JSON support at the platform-library layer. For packagers, it is a small but widely depended-on C library with GIR metadata, pkg-config files, command-line tools, and the usual GNOME release engineering expectations.

### 时间线

- 2007: JSON-GLib 0.4.0 is announced as a GObject-based C library for parsing and writing JSON streams.
- 2010: JSON-GLib 0.10.0 adds broader serialization/deserialization support and introspection improvements.
- 2011: JSON-GLib 0.12.0 adds JsonBuilder, JsonReader, stream APIs, surrogate-pair support, and a GObject-Introspection dependency.
- 2014: JSON-GLib 1.0 is announced after years of 0.x development.
- 2017: JSON-GLib 1.2 adds Meson build support and immutable JSON node support.
- 2020: JSON-GLib 1.6 moves API reference generation to gi-docgen and adds `json-glib-format --output`.

### Related projects

- JSON-GLib is closely related to GLib, GObject, GIO, GObject Introspection, GTK, and GNOME applications. It occupies a different niche from json-c and Jansson by integrating JSON with the GObject type system and GLib data conventions.

### 来源

- <https://gitlab.gnome.org/GNOME/json-glib>
- <https://gitlab.gnome.org/GNOME/json-glib/-/blob/master/NEWS>
- <https://gitlab.gnome.org/GNOME/json-glib/-/blob/master/README.md>
- <https://gnome.pages.gitlab.gnome.org/json-glib>
- <https://groups.google.com/g/mailing.gnome.announce/c/JoqnaR9gA7s>
- <https://lwn.net/Articles/258532/>
- <https://wiki.gnome.org/Projects/JsonGlib>


## 安全说明

library-like package without higher-risk signals.

- **Geiger 风险:** 绿色 / 低
- library-like package without higher-risk signals

## 源数据库详情

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** json-glib
- **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

## 其他软件包管理器记录

- Debian apt - gir1.2-json-1.0 - 1.10.6+ds-2: normalized package name match | Debian stable package indexes: gir1.2-json-1.0 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | GLib JSON manipulation library (introspection data) | https://wiki.gnome.org/Projects/JsonGlib
- Debian apt - json-glib-tools - 1.10.6+ds-2: normalized package name match | Debian stable package indexes: json-glib-tools from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | GLib JSON manipulation library (tools) | https://wiki.gnome.org/Projects/JsonGlib
- Debian apt - libjson-glib-1.0-0 - 1.10.6+ds-2: normalized package name match | Debian stable package indexes: libjson-glib-1.0-0 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | GLib JSON manipulation library | https://wiki.gnome.org/Projects/JsonGlib
- Debian apt - libjson-glib-1.0-common - 1.10.6+ds-2: normalized package name match | Debian stable package indexes: libjson-glib-1.0-common from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | GLib JSON manipulation library (common files) | https://wiki.gnome.org/Projects/JsonGlib
- Debian apt - libjson-glib-dev - 1.10.6+ds-2: normalized package name match | Debian stable package indexes: libjson-glib-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | GLib JSON manipulation library (development files) | https://wiki.gnome.org/Projects/JsonGlib
- Debian apt - libjson-glib-doc - 1.10.6+ds-2: normalized package name match | Debian stable package indexes: libjson-glib-doc from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | GLib JSON manipulation library (documentation) | https://wiki.gnome.org/Projects/JsonGlib
- Nix - json-glib: normalized package name match | nixpkgs package indexes: pkgs/by-name/js/json-glib/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - gir1.2-json-1.0 - 1.8.0-2build2: normalized package name match | Ubuntu 24.04 LTS package indexes: gir1.2-json-1.0 from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | GLib JSON manipulation library (introspection data) | https://wiki.gnome.org/Projects/JsonGlib
- Ubuntu apt - json-glib-tools - 1.8.0-2build2: normalized package name match | Ubuntu 24.04 LTS package indexes: json-glib-tools from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | GLib JSON manipulation library (tools) | https://wiki.gnome.org/Projects/JsonGlib
- Ubuntu apt - libjson-glib-1.0-0 - 1.8.0-2build2: normalized package name match | Ubuntu 24.04 LTS package indexes: libjson-glib-1.0-0 from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | GLib JSON manipulation library | https://wiki.gnome.org/Projects/JsonGlib
- Ubuntu apt - libjson-glib-1.0-common - 1.8.0-2build2: normalized package name match | Ubuntu 24.04 LTS package indexes: libjson-glib-1.0-common from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | GLib JSON manipulation library (common files) | https://wiki.gnome.org/Projects/JsonGlib
- Ubuntu apt - libjson-glib-dev - 1.8.0-2build2: normalized package name match | Ubuntu 24.04 LTS package indexes: libjson-glib-dev from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | GLib JSON manipulation library (development files) | https://wiki.gnome.org/Projects/JsonGlib
- Ubuntu apt - libjson-glib-doc - 1.8.0-2build2: normalized package name match | Ubuntu 24.04 LTS package indexes: libjson-glib-doc from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | GLib JSON manipulation library (documentation) | https://wiki.gnome.org/Projects/JsonGlib
- apk - json-glib - 1.10.8-r0: normalized package name match | Alpine Linux edge package indexes: json-glib from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | JSON library built on GLib | https://gitlab.gnome.org/GNOME/json-glib
- apk - json-glib-dbg - 1.10.8-r0: normalized package name match | Alpine Linux edge package indexes: json-glib-dbg from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | JSON library built on GLib (debug symbols) | https://gitlab.gnome.org/GNOME/json-glib
- apk - json-glib-dev - 1.10.8-r0: normalized package name match | Alpine Linux edge package indexes: json-glib-dev from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | JSON library built on GLib (development files) | https://gitlab.gnome.org/GNOME/json-glib


## 相关链接

- [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.
- [glib](https://pkg.so/zh-hans/brew/glib/) - Runtime dependency declared by Homebrew.
- [gettext](https://pkg.so/zh-hans/brew/gettext/) - Runtime dependency declared by Homebrew.
- [pkgconf](https://pkg.so/zh-hans/brew/pkgconf/) - Build dependency declared by Homebrew.
- [ninja](https://pkg.so/zh-hans/brew/ninja/) - Build dependency declared by Homebrew.
- [meson](https://pkg.so/zh-hans/brew/meson/) - Build dependency declared by Homebrew.
- [gstreamer](https://pkg.so/zh-hans/brew/gstreamer/) - Popular package that depends on this formula.
- [spice-gtk](https://pkg.so/zh-hans/brew/spice-gtk/) - Popular package that depends on this formula.
- [swtpm](https://pkg.so/zh-hans/brew/swtpm/) - Popular package that depends on this formula.
- [siril](https://pkg.so/zh-hans/brew/siril/) - Popular package that depends on this formula.
- [gitg](https://pkg.so/zh-hans/brew/gitg/) - Popular package that depends on this formula.
- [pdfpc](https://pkg.so/zh-hans/brew/pdfpc/) - Popular package that depends on this formula.
- [rmlint](https://pkg.so/zh-hans/brew/rmlint/) - Popular package that depends on this formula.
- [libdazzle](https://pkg.so/zh-hans/brew/libdazzle/) - Shares pkgdb curated category or tags: cli, developer-tools, glib, gnome, libraries.
- [pango](https://pkg.so/zh-hans/brew/pango/) - Shares pkgdb curated category or tags: cli, developer-tools, gnome, libraries, library.
- [libdeflate](https://pkg.so/zh-hans/brew/libdeflate/) - Shares pkgdb curated category or tags: c, cli, developer-tools, libraries, library.
- [libdatrie](https://pkg.so/zh-hans/brew/libdatrie/) - Shares pkgdb curated category or tags: c, cli, developer-tools, libraries, library.
- [nspr](https://pkg.so/zh-hans/brew/nspr/) - Shares pkgdb curated category or tags: c, cli, developer-tools, libraries, library.
- [protobuf-c](https://pkg.so/zh-hans/brew/protobuf-c/) - Shares pkgdb curated category or tags: c, cli, developer-tools, libraries, library.
- [ossp-uuid](https://pkg.so/zh-hans/brew/ossp-uuid/) - Shares pkgdb curated category or tags: c, cli, developer-tools, libraries, library.
- [chmlib](https://pkg.so/zh-hans/brew/chmlib/) - Shares pkgdb curated category or tags: c, cli, developer-tools, libraries, library.
- [vte3](https://pkg.so/zh-hans/brew/vte3/) - Local package facts share a topical domain. Shared terms: cli, developer, developer-tools, gettext, glib.
- [gcab](https://pkg.so/zh-hans/brew/gcab/) - Local package facts share a topical domain. Shared terms: cli, developer, developer-tools, gettext, glib.

## Combined YAML source

View the package source record on GitHub. [combined/json-glib.yml](https://github.com/mxcl/pkgdb/blob/main/combined/json-glib.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
- external package-manager database matches
- cross-ecosystem install command graph
