We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
String json = "{name:'nutz', age:12, address:[{area:1,name:'abc'}, {area:2,name:'123'}]}"; Object obj = Json.fromJson(json); List<String> list = new ArrayList<String>(); list.add("age"); list.add("address[].name"); Object newobj = Mapl.excludeFilter(obj, list); System.out.println(newobj);
上面出来的是{address=[{area=1}, {area=2}], name=nutz},这是正常的。
可是,去掉list.add("address[].name"); 出来的却是{address=[{area=1, name=abc}, {area=2, name=123}, {area=1, name=abc}, {area=2, name=123}], name=nutz}。
用Mapl.excludeFilter(Object maplist, List paths)进行过滤时,如果(Pojo)maplist里有属性是List时,且paths中不含对List的过滤,转为json后List会出现2次。
The text was updated successfully, but these errors were encountered:
@junkai
Sorry, something went wrong.
废弃mapl包
No branches or pull requests
上面出来的是{address=[{area=1}, {area=2}], name=nutz},这是正常的。
可是,去掉list.add("address[].name");
出来的却是{address=[{area=1, name=abc}, {area=2, name=123}, {area=1, name=abc}, {area=2, name=123}], name=nutz}。
用Mapl.excludeFilter(Object maplist, List paths)进行过滤时,如果(Pojo)maplist里有属性是List时,且paths中不含对List的过滤,转为json后List会出现2次。
The text was updated successfully, but these errors were encountered: