从python库到grep json。

gron的Python项目详细描述


#Python群[构建状态](https://travis-ci.org/venthur/python-gron.svg?branch=master)](https://travis ci.org/venthur/python gron)


make json greppable,这是
[gron]的python实现(https://github.com/tomnomnom/gron)。



要想
>安装,请使用:


``bash
$pip install gron
`````









>api文档可以在这里找到(http://gron.readthedocs.io/en/latest/)。




















'json
{
“一”:1,
“二”:2.2,
“三-b”:“3”,
“四”:[1,2,3,4],
“五”:{
“alpha”:[“fo”,“fum”],
“beta”:{
“嘿”:“窍门怎么样?”
>

},
“aboool”:true,
“aboool2”:false,
“isnull”:null,
“id”:66912849

` ` ` ` ` `


` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` `={};
json.five.alpha=[];
json.five.alpha[0]=“fo”;
json.five.alpha[1]=“fum”;
json.five.beta={};
json.five.beta.hey=“诀窍如何?”;
json.four=[];
json.four[0]=1;
json.four[1]=2;
json.four[2]=3;
json.four[3]=4;
json.id=66912849;
json.isnull=null;
json.one=1;
json.two=2.2;
json[“three-b”]=“3”;``
````


`gron`将从``stdin```````bash```bash``bash``gron`将从``stdin`中读取`:

`bash
$cat tests/data/one.json gron
json={};
json.aboool=true;
json.aboool2=false;
json.5={};
json.5.5.alpha=[[]br/>;
json.5.5.alpha[0]=“fo”;
json.5.5.5.“
json.5.beta={};
json.5.beta.嘿=“戏法怎么样?”;
json.four=[];
json.four[0]=1;
json.four[1]=2;
json.four[2]=3;
json.four[3]=4;
json.id=66912849;
json.isnull=null;
json.one=1;
json.two=2.2;
json[“three-b”]=“3”;
```

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java有没有任何安卓开发方法可以在屏幕上找到最大单位?   java中的客户机/服务器:程序在输入第二个文件名时卡住   基于java XML上下文的bean无法执行构造函数注入:未找到默认构造函数   java在应用程序中显示通知或作出反应   java如何使spring boot在多对多关系中创建的id成为主键   java有没有办法用JNI设置DirectByteBuffer内存?   java如何为连接池配置Hibernate、Spring和ApacheDBCP?   使用double而不是int的java循环   java我希望输入不区分大小写   java如何在JEditorPane中显示charset=windows1252的html   在Java中,什么会导致抛出异常FileNotFoundException?   面向对象Java哈希集实现设计   用于打印字母的java For循环   java在测试期间向类构造函数插入特定值   SpringJavaMongoDB类NotFoundException:org。springframework。数据转换收集工厂   java将SOAP XML字符串转换为对象或仅读取其内容   java如何将单个POJO类映射到多个表   java中的数组ArrayIndex越界异常