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

查看:115
本文介绍了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天全站免登陆