从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是否在servlet中检索上一页路径?   Java抱怨在开关的默认情况下未初始化最终字段   Java泛型:为什么编译器不能判断这个类<t>对象与这个类的类型参数的对象的类具有相同的类型?   Java:继承方法中使用的私有变量   HibernateJava。ClassCastException:java。lang.Integer不能强制转换为abc。def。我的项目。奥姆。EmployeeTopMetaData   http java发布和下载文件   java改进条件检查   java如何将2d数组的条目作为键放在地图中   java如何获取传递给运行时的值。getRuntime。JUnit测试用例中的exit(value)   java注释来创建所有可能的构造函数   自动建议列表:java。lang.IllegalArgumentException:在XPath表达式为null时找不到元素   为什么MapAPI在Java中不提供流功能?   gradle不导入本地java库   尽管我使用的是SessionCreationPolicy,java Spring安全性似乎仍在使用会话。无国籍   使用java查找MongoDB中数组元素的平均值