2 篇文章带有标签 “jq”

Json Formatter

test.json

{ "stuff": { "that": [1,2,3], "isin": true, "json": "end"}}

jq

在命令行运行

jq . <<< '{ "stuff": { "that": [1,2,3], "isin": true, "json": "end"}}'
jq . test.json

在vim的命令模式下运行

%!jq .

python json.tool

在命令行运行

python -m json.tool <<< '{ "stuff": { "that": [1,2,3], "isin": true, "json": "end"}}'
python -m json.tool test.json

在vim的命令模式下运行

%!python -m json.tool

在线格式化 Format JSON JSON Formatter JSON Formatter, Validator, Vi

OpenResty 内执行 Lua 脚本

OpenResty 是一款基于 NGINX 和 LuaJIT 的 Web 平台。

拉取 OpenResty 镜像

  • Ubuntu
sudo docker pull openresty/openresty:xenial
  • CentOS
sudo docker pull openresty/openresty:centos

查看镜像的标签 $ sudo docker inspect openresty/openresty:centos | jq '.[].Config.Labels' { "maintainer": "Evan Wies <evan@neomantra.net>", "org.label-schema.build-date": "20210915", "org.label-schema.license": "GPLv2", "org.label-schema.name": "CentOS Base Image", "org.label-schema.schema-version": "1.0", "org.label-schema.