从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如何使用jaxb整理集合?   java改装添加带有令牌和id的标头   Java Webstart在启动应用程序之前停止   mysql将请求主体作为JSON存储到Java数据库中   春天3。从Java 7更新到Java 8后x应用程序不工作   java如何为我的mock实例化unirest HttpResponse<JsonNode>?   java两个servlet在同一场战争中与两场独立战争中的利弊?   java Mockito验证未失败   GWT中的java文件读取器   java避免代码重复   java谁将设置saml cookie,其中包含凭证信息   java如何修改jar包代码,然后重新导出更新的jar包?   BST数据结构中的java递归差异   java如何从文本文件中读取存储的哈希表?   带有quercus的java php comet   java从SeleniumWebDriver写入json变量   javascript如何在同一个action类中对方法调用action?