Spring Framework MappingJackson2JsonView - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Spring Framework MappingJackson2JsonView class.

This code example shows how to use the following methods:
 *       at http://forum.springsource.org/archive/index.php/t-84006.html 
 * <p> 
 * @author Vigil Bose 
 * @author Gary Russell 
public class ExtendedMappingJacksonJsonView extends MappingJackson2JsonView { 
	@SuppressWarnings({"rawtypes" }) 
	protected Object filterModel(Map<String, Object> model){ 
		Object result = super.filterModel(model); 
		if (!(result instanceof Map)){ 
			return result; 
		Map map = (Map) result; 
		if (map.size() == 1){ 
			return map.values().toArray()[0]; 
		return map;