- 浏览: 1449180 次
- 性别:
- 来自: 北京
文章分类
- 全部博客 (691)
- linux (207)
- shell (33)
- java (42)
- 其他 (22)
- javascript (33)
- cloud (16)
- python (33)
- c (48)
- sql (12)
- 工具 (6)
- 缓存 (16)
- ubuntu (7)
- perl (3)
- lua (2)
- 超级有用 (2)
- 服务器 (2)
- mac (22)
- nginx (34)
- php (2)
- 内核 (2)
- gdb (13)
- ICTCLAS (2)
- mac android (0)
- unix (1)
- android (1)
- vim (1)
- epoll (1)
- ios (21)
- mysql (3)
- systemtap (1)
- 算法 (2)
- 汇编 (2)
- arm (3)
- 我的数据结构 (8)
- websocket (12)
- hadoop (5)
- thrift (2)
- hbase (1)
- graphviz (1)
- redis (1)
- raspberry (2)
- qemu (31)
- opencv (4)
- socket (1)
- opengl (1)
- ibeacons (1)
- emacs (6)
- openstack (24)
- docker (1)
- webrtc (11)
- angularjs (2)
- neutron (23)
- jslinux (18)
- 网络 (13)
- tap (9)
- tensorflow (8)
- nlu (4)
- asm.js (5)
- sip (3)
- xl2tp (5)
- conda (1)
- emscripten (6)
- ffmpeg (10)
- srt (1)
- wasm (5)
- bert (3)
- kaldi (4)
- 知识图谱 (1)
最新评论
-
wahahachuang8:
我喜欢代码简洁易读,服务稳定的推送服务,前段时间研究了一下go ...
websocket的helloworld -
q114687576:
http://www.blue-zero.com/WebSoc ...
websocket的helloworld -
zhaoyanzimm:
感谢您的分享,给我提供了很大的帮助,在使用过程中发现了一个问题 ...
nginx的helloworld模块的helloworld -
haoningabc:
leebyte 写道太NB了,期待早日用上Killinux!么 ...
qemu+emacs+gdb调试内核 -
leebyte:
太NB了,期待早日用上Killinux!
qemu+emacs+gdb调试内核
基本语法:https://www.cnblogs.com/jpfss/p/10973590.html
这里有个表格,说明JSONPath语法元素和对应XPath元素的对比。
XPath JSONPath Description
/ $ 表示根元素
. @ 当前元素
/ . or [] 子元素
.. n/a 父元素
// .. 递归下降,JSONPath是从E4X借鉴的。
* * 通配符,表示所有的元素
@ n/a 属性访问字符
[] []
子元素操作符
| [,]
连接操作符在XPath 结果合并其它结点集合。JSONP允许name或者数组索引。
n/a [start:end:step]
数组分割操作从ES4借鉴。
[] ?()
应用过滤表示式
n/a ()
脚本表达式,使用在脚本引擎下面。
() n/a Xpath分组
模糊匹配可以用正则:
https://bbs.csdn.net/topics/290047788
or运算用逗号分隔:
https://www.jb51.cc/js/159788.html
这里有个表格,说明JSONPath语法元素和对应XPath元素的对比。
XPath JSONPath Description
/ $ 表示根元素
. @ 当前元素
/ . or [] 子元素
.. n/a 父元素
// .. 递归下降,JSONPath是从E4X借鉴的。
* * 通配符,表示所有的元素
@ n/a 属性访问字符
[] []
子元素操作符
| [,]
连接操作符在XPath 结果合并其它结点集合。JSONP允许name或者数组索引。
n/a [start:end:step]
数组分割操作从ES4借鉴。
[] ?()
应用过滤表示式
n/a ()
脚本表达式,使用在脚本引擎下面。
() n/a Xpath分组
模糊匹配可以用正则:
https://bbs.csdn.net/topics/290047788
or运算用逗号分隔:
https://www.jb51.cc/js/159788.html
<html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>JavaScript JSONPath example | JSON tutorial | w3resource</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <script type="text/javascript" src="http://www.w3resource.com/JSON/json.js"></script> <script type="text/javascript" src="http://www.w3resource.com/JSON/jsonpath.js"></script> </head> <body> <h1>This is an example of JavaScript with JSONPath</h1> <script type="text/javascript"> var json = { "MovieDatabase": { "movie": [ { "name":"nnn", "genre": "comedy", "director": "teacher", "Facebook_like": 252 }, { "name":"helloc", "director": "doctor", "Facebook_like": 100, "movie":{ "name":"haohao", "genre": "comedy", "director": "killinux", "Facebook_like": 300 } }, { "name":"haha", "genre": "adventure", "director": "Ruben Fleischer", "Facebook_like": 114 } ] } }; result = ""; result += jsonPath(json, "$.MovieDatabase.movie[*].director").toJSONString() + "<br />"; //find all directors result += jsonPath(json, "$..director").toJSONString() + "<br />"; //find all directors result += "movie----"+jsonPath(json, "$..movie").toJSONString() + "<br />"; //find all directors result += "*-----"+jsonPath(json, "$.MovieDatabase.*").toJSONString() + "<br />"; //find all movies result += jsonPath(json, "$.MovieDatabase..Facebook_like").toJSONString() + "<br />"; //find all facebook lies of all the movies result += jsonPath(json, "$..movie[(@.length-1)]").toJSONString() + "<br />"; //the last movie in data result += jsonPath(json, "$..movie[-1:]").toJSONString() + "<br />"; //the last movie in data result += jsonPath(json, "$..movie[0,1]").toJSONString() + "<br />"; //first two movies result += jsonPath(json, "$..movie[:3]").toJSONString() + "<br />"; //first three movies result += "genre---"+jsonPath(json, "$..movie[?(@.genre)]").toJSONString() + "<br />"; //or movies with genre result +="Facebook_like----"+ jsonPath(json, "$..movie[?(@.Facebook_like>200)]").toJSONString() + "<br />"; // condition result += "or----"+jsonPath(json, "$..[?(@.name == 'nnn'),?(@.name == 'haohao')]").toJSONString() + "<br />"; //or result += "mohu----"+jsonPath(json, "$..[?(/ha/.test(@.name))]]").toJSONString() + "<br />"; //fuzzy result += "all----"+jsonPath(json, "$..*").toJSONString() + "\n"; // all members in the JSON document document.write(result); </script> </body> </html>
发表评论
-
indexedDB存图片减少请求
2020-05-21 19:23 522getImageFile()获取网络图片 showImage ... -
vizceral-example的例子
2020-03-19 18:53 324自定义图和加载结构 代码在 https://github.c ... -
流动图神器vizceral
2019-10-12 19:04 442把c的代码生成json:https://github.com/ ... -
emscripten asm.js的helloworld
2018-03-01 20:15 1073mac下安装: brew install SDL2 SDL2_ ... -
websocket上传文件
2016-12-15 13:30 4381nginx的上传 查看http://haoningabc.it ... -
webpack的helloworld
2016-11-02 10:42 883参考 http://www.jianshu.com/p/42e ... -
iphone6等移动端的css自适应
2016-10-17 01:18 1175参考 http://jingyan.baidu.com/art ... -
javascript自定义事件
2016-06-01 21:49 528一言不合上代码 <input value=" ... -
html5的fiesystem api 浏览器本地存储
2016-06-01 15:59 892html5的fiesystem api可以存取本地文件 一言不 ... -
websocket传传图片
2015-12-25 17:51 7213参考[url]http://www.adobe.com/dev ... -
angularjs使用include后双向绑定失败的解决
2015-12-20 19:41 1841原理参考 http://segmentfault.com/q/ ... -
html5 陀螺仪
2014-11-26 21:05 5828<html> <head> ... -
webgl的贝塞尔曲线
2014-11-12 00:56 2494BezierCurve webgl的贝塞尔曲线 webgl ... -
chrome app的helloworld
2014-11-11 13:56 675参考 http://blog.csdn.net/rydiy/a ... -
shader and Program编程基本概念 - 转
2014-11-04 11:50 1473原地址:http://blog.csdn.net/myarro ... -
javascript对象转json
2014-10-17 14:09 969<html> <head>& ... -
jquery 的svg中国地图
2012-12-16 14:37 28040三种吧 1.d3.js很强大 2.jquery的 jvecto ... -
纯css的树型结构
2012-10-03 18:29 1238<html><head> ... -
D3 的3d图
2012-09-16 17:05 1431LCF http://mathworld.wolfram. ... -
jquery table拖拽排序
2012-07-14 21:45 7095参考http://dragsort.codeplex.com/ ...
相关推荐
hello world
OpenWrt之helloworld程序开发入门,里面包含helloworld和Makefile
输出HELLOWORLD然后输出Helloworld最后的最后的输出Helloworld
SpringMVC ---- HelloWorld ---- 代码 SpringMVC ---- HelloWorld ---- 代码 SpringMVC ---- HelloWorld ---- 代码 SpringMVC ---- HelloWorld ---- 代码 SpringMVC ---- HelloWorld ---- 代码 SpringMVC ---- Hello...
打印HelloWorld ,在Visual Studio的开发环境当中,实现简单的操作。
一个简单的qt版helloworld程序
Hello World C源码 Hello World C源码 Hello World C源码 Hello World C源码 Hello World C源码
helloworld vbs 脚本hellohelloworld vbs 脚本world vbs 脚本helloworld vbs 脚本helloworld vbs 脚本helloworld vbs 脚本
c++编写hello world 简单的c++程序
Manning.Struts.2.in.Action 's example HelloWorld.war provides a convenient example of a minimal Struts 2 application
open cascade hello world open cascade hello world open cascade hello world open cascade hello world open cascade hello world open cascade hello world open cascade hello world open cascade hello world
深入浅出hello world。从一个简单的hello,world程序开始,经过预处理、编译、汇编、链接、加载各个步骤详细介绍程序从编辑到执行的过程。深入的讲解了linux下程序的编译过程,并且讲解了linux kernel系统调用的相关...
helloworld War包,直接上传至服务器webapp目录,自动解压,专用,
HelloWorld helloworld = (HelloWorld) ctx.lookup("HelloWorldBean/remote"); out.println(helloworld.SayHello("佛山人")); 5.用ant或eclipse,把客户端文件打成war包,发布到jboss上 6.输入...
ssh helloworld小例子 ssh helloworld小例子 ssh helloworld小例子 ssh helloworld小例子 ssh helloworld小例子
Spring4 HelloWorld初学Spring,java bean通过applicationContext.xml配置SpringIoC容器生成。
helloworld.c编译为可执行文件helloworld的过程文件 helloworld.c helloworld.i helloworld.s helloworld.o helloworld
简单的helloworld程序,适合初学者做实验用,我就是做试验用的
cocos2d-x初探学习笔记(1)--HelloWorld
C#第一个程序,helloworld using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace helloworld { class helloworld { [STAThread] static void Main(string[] args)...