根据模板将原始的JSON进行过滤, 只显示一部分. 不做转换.
包括两种模式, 即, 包含, 排除模式, 默认为排除模式.
@author juqkai(juqkai@gmail.com)
697071727374757677
* maplist结构的对象 * @param paths * 过滤列表 */ public static Object includeFilter(Object maplist, List<String> paths) { FilterConvertImpl filter = new FilterConvertImpl(paths); filter.useIncludeModel(); return filter.convert(maplist); }
838485868788899091
* maplist结构的对象 * @param paths * 过滤列表 */ public static Object excludeFilter(Object maplist, List<String> paths) { FilterConvertImpl filter = new FilterConvertImpl(paths); filter.useExcludeModel(); return filter.convert(maplist); }
808182838485868788
949596979899100101102