← 返回命令列表

Linux command

spa-json-dump 命令

网络

复制后可按需替换文件名、目录或参数。

常用示例

Convert a PipeWire configuration file

spa-json-dump /usr/share/pipewire/pipewire.conf

Convert a SPA JSON file

spa-json-dump [path/to/file.conf] | jq .

Read SPA JSON from stdin

cat [path/to/file.conf] | spa-json-dump

说明

spa-json-dump reads a SPA JSON file or standard input and outputs it as standard JSON. SPA JSON is a lightweight JSON variant used by PipeWire for its configuration files. The SPA JSON parser is intentionally relaxed and can handle a wide range of JSON-like syntax, including unquoted strings and comments, which are not valid in strict JSON. This tool bridges the gap by converting SPA JSON into standards-compliant JSON that can be processed by tools like jq or any JSON parser.

FAQ

What is the spa-json-dump command used for?

spa-json-dump reads a SPA JSON file or standard input and outputs it as standard JSON. SPA JSON is a lightweight JSON variant used by PipeWire for its configuration files. The SPA JSON parser is intentionally relaxed and can handle a wide range of JSON-like syntax, including unquoted strings and comments, which are not valid in strict JSON. This tool bridges the gap by converting SPA JSON into standards-compliant JSON that can be processed by tools like jq or any JSON parser.

How do I run a basic spa-json-dump example?

Run `spa-json-dump /usr/share/pipewire/pipewire.conf` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

Where can I find more spa-json-dump examples?

This page includes 3 examples for spa-json-dump, plus related commands for nearby Linux tasks.