赞
踩
要解析的json串:
{ "store": { "book": [ { "title": "高效Java", "price": 10 }, { "title": "研磨设计模式", "price": 12 }, { "title": "重构", "isbn": "553", "price": 8 }, { "title": "虚拟机", "isbn": "395", "price": 22 } ], "bicycle": { "color": "red", "price": 19 } } }
测试:
- package json.fastjson.jsonpath;
-
- import java.util.List;
-
- import com.alibaba.fastjson.JSONPath;
-
- public class TestJSONPath2 {
-
- @SuppressWarnings("unchecked")
- public static void main(String[] args) {
- String json = "{\"store\":{\"book\":[{\"title\":\"高效Java\",\"price\":10},{\"title\":\"研磨设计模式\",\"price\":12},{\"title\":\"重构\",\"isbn\":\"553\",\"price\&#
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。