Unix 命令行 JSON 解析器? [英] Unix command-line JSON parser?

查看:35
本文介绍了Unix 命令行 JSON 解析器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

谁能推荐一个 Unix(选择你的风格)JSON 解析器,它可用于从管道中的 JSON 响应中内省值?

Can anyone recommend a Unix (choose your flavor) JSON parser that could be used to introspect values from a JSON response in a pipeline?

推荐答案

您可以使用这个命令行解析器(如果您愿意,可以将其放入 bash 别名中),使用 Perl 核心中内置的模块:

You can use this command-line parser (which you could put into a bash alias if you like), using modules built into the Perl core:

perl -MData::Dumper -MJSON::PP=from_json -ne'print Dumper(from_json($_))'

这篇关于Unix 命令行 JSON 解析器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆