jackson工具类有动态属性过虑功能 在业务应用中经常会有指定属性序列化json的需求,C#中这个功能很容易就可以解决:使用lambda重新构造一下匿名对象就可以了。一行代码搞定。java是这样解决的。

public JsonMapper filter(String filterName, String... properties) {
		FilterProvider filterProvider = new SimpleFilterProvider().addFilter(filterName,
				SimpleBeanPropertyFilter.serializeAllExcept(properties));
		this.setFilters(filterProvider);
		return this;
	}

全代码:http://download.csdn.net/download/wolf12/10232943