一个为Python服务的JSon Helper

jthon的Python项目详细描述


JTHON

json,但使用lisp。这是一个使处理json文件更容易的实用程序。

安装

pip安装jthon

使用量

importjthona_new_dict={'fruits':{'pineapple':0,'apples':2,'orange':4,'pears':1}}example=jthon.load('fruits',a_new_dict)find=example.find(key='apple',exact=False)forfoundinfind:print("I've found '{}', with a value of '{}'.".format(found.key,found.value))print("{}".format(found.siblings))print("There are {} oranges in the dict!".format(example.get('fruits').get('orange')))example['fruits']['peach']=1example.save()print(example)

更多示例可在examples文件夹中找到

要求

python3 >

作者

许可证

此项目在麻省理工学院授权-有关详细信息,请参见LICENSE文件

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

推荐PyPI第三方库


热门话题
目标c如何将“stringWithFormat”转换为Java?   如何在Android上添加Java库兼容性的持续集成检查?   java使用Jackson在Swagger中添加属性示例   scala中的javacogroup-two-RDD   java将用户输入的字符拆分为ArrayList   使用netbeans和命令提示符时未发现java类异常   regex如何在Java中获取除逗号和数字以外的字符?   已定义java wsimport<property>   java在对动态Google应用程序引擎后端的后续请求中重用对象   java在创建新对象时尝试向JNI对象的构造函数提供参数时出错   java如何同时检测方法post中的重复请求   使用model属性传递的java Spring MVC对象为空   java字符串可以用在三元条件语句中吗?   java哪里可以找到好的机器人代码教程?   java打印11000,具有来自同一类的两个线程(偶数和奇数)   发送文件列表时发生java Spring Rest异常   java在将AspectJ与iBatis、Spring一起使用时未应用任何事务