use of com.alibaba.json.bvt.path.JSONPath_between_int.Entity in project fastjson by alibaba.
the class JSONPath_size method test_path_size_1.
public void test_path_size_1() throws Exception {
List list = new ArrayList();
list.add(new Entity(101, "kiki"));
list.add(new Entity(102, "ljw2083"));
list.add(new Entity(103, "ljw2083"));
JSONPath path = JSONPath.compile("$");
Assert.assertEquals(3, path.size(list));
}
use of com.alibaba.json.bvt.path.JSONPath_between_int.Entity in project fastjson by alibaba.
the class JSONPath_size method test_path.
public void test_path() throws Exception {
List list = new ArrayList();
list.add(new Entity(101, "kiki"));
list.add(new Entity(102, "ljw2083"));
list.add(new Entity(103, "ljw2083"));
JSONObject root = new JSONObject();
root.put("values", list);
Assert.assertEquals(3, JSONPath.size(root, "$.values"));
}
use of com.alibaba.json.bvt.path.JSONPath_between_int.Entity in project fastjson by alibaba.
the class JSONPath_size method test_root.
public void test_root() throws Exception {
List list = new ArrayList();
list.add(new Entity(101, "kiki"));
list.add(new Entity(102, "ljw2083"));
list.add(new Entity(103, "ljw2083"));
Assert.assertEquals(3, JSONPath.size(list, "$"));
}
use of com.alibaba.json.bvt.path.JSONPath_between_int.Entity in project fastjson by alibaba.
the class JSONPath_size method test_path_size_2.
public void test_path_size_2() throws Exception {
List list = new ArrayList();
list.add(new Entity(101, "kiki"));
list.add(new Entity(102, "ljw2083"));
list.add(new Entity(103, "ljw2083"));
JSONObject root = new JSONObject();
root.put("values", list);
JSONPath path = JSONPath.compile("$.values");
Assert.assertEquals(3, path.size(root));
}
Aggregations