LLSD和JSON之间的CLI转换
项目描述
llsd2json
LLSD和JSON之间的CLI转换。
示例
$ echo '<llsd><map><key>name</key><string>Ruth</string></map></llsd>' | llsd2json | jq -r .name
Ruth
安装和使用
使用pip或pipx安装llsd2json
pipx install llsd2json
llsd2json
usage: llsd2json [-h] [--format {auto,xml,binary,notation}] [input]
Convert LLSD to JSON
positional arguments:
input LLSD string (default: stdin)
options:
-h, --help show this help message and exit
--format {auto,xml,binary,notation}, -f {auto,xml,binary,notation}
LLSD format
json2llsd
usage: json2llsd [-h] [--format {xml,binary,notation}] [input]
Convert JSON to LLSD
positional arguments:
input JSON string (default: stdin)
options:
-h, --help show this help message and exit
--format {xml,binary,notation}, -f {xml,binary,notation}
LLSD format
注意
LLSD和JSON之间的转换不是完全双向的。JSON不支持LLSD的几种数据类型,例如date
、binary
、uri
,并且没有特定的数字类型。
项目详情
下载文件
下载适合您平台的文件。如果您不确定选择哪个,请了解有关安装包的更多信息。
源代码分发
llsd2json-1.0.0.tar.gz (7.9 kB 查看散列)
构建分发
llsd2json-1.0.0-py3-none-any.whl (4.3 kB 查看散列)
关闭
llsd2json-1.0.0.tar.gz的散列
算法 | 散列摘要 | |
---|---|---|
SHA256 | bfa0479538c5ddbd9ded8be15adb6fd1829303b44848595bdfeb317fed946abd |
|
MD5 | 4bcdd6b78cd48a07963ec2023a1b1ca6 |
|
BLAKE2b-256 | 72916c6b73bccd33b170175d92d46315d8014ad67e034b6f831c4b9ca4bcec4e |