从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”;
```
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”;
```