@@ -0,0 +1,1667 @@
+package com.alibaba.json.bvt.serializer;%0A%0Aimport java.util.ArrayList;%0Aimport java.util.List;%0A%0Aimport junit.framework.Assert;%0Aimport junit.framework.TestCase;%0A%0Aimport com.alibaba.fastjson.JSON;%0Aimport com.alibaba.fastjson.serializer.JSONSerializer;%0Aimport com.alibaba.fastjson.serializer.PropertyPreFilter;%0A%0Apublic class PropertyPathTest2 extends TestCase %7B%0A%0A    public void test_path() throws Exception %7B%0A        Person p1 = new Person();%0A        p1.setId(100);%0A        %0A        Person c1 = new Person();%0A        c1.setId(1000);%0A        %0A        Person c2 = new Person();%0A        c2.setId(2000);%0A        %0A        p1.getChildren().add(c1);%0A        p1.getChildren().add(c2);%0A        %0A        Assert.assertEquals(%22%7B%5C%22children%5C%22:%5B%7B%5C%22id%5C%22:1000%7D,%7B%5C%22id%5C%22:2000%7D%5D,%5C%22id%5C%22:100%7D%22, JSON.toJSONString(p1, new MyPropertyPreFilter()));%0A    %7D%0A%0A    public static class MyPropertyPreFilter implements PropertyPreFilter %7B%0A%0A        public boolean apply(JSONSerializer serializer, Object source, String name) %7B%0A            String path = serializer.getContext().getPath() + %22.%22 + name;%0A%0A            if (path.endsWith(%22%5D.children%22)) %7B%0A                return false;%0A            %7D%0A%0A            return true;%0A        %7D%0A%0A    %7D%0A%0A    public static class Person %7B%0A%0A        private int          id;%0A%0A        private List%3CPerson%3E children = new ArrayList%3CPerson%3E();%0A%0A        public int getId() %7B%0A            return id;%0A        %7D%0A%0A        public void setId(int id) %7B%0A            this.id = id;%0A        %7D%0A%0A        public List%3CPerson%3E getChildren() %7B%0A            return children;%0A        %7D%0A%0A        public void setChildren(List%3CPerson%3E children) %7B%0A            this.children = children;%0A        %7D%0A%0A    %7D%0A%7D%0A

add testcase