protected Object filterModel(Map<String, Object> model) {
        Map<String, Object> result = new HashMap<>(model.size());
        Set<String> renderedAttributes = !CollectionUtils.isEmpty(this.renderedAttributes) ? //
                this.renderedAttributes //
                : model.keySet();

        for (Map.Entry<String, Object> entry : model.entrySet()) {
            if (!(entry.getValue() instanceof BindingResult)
                    && renderedAttributes.contains(entry.getKey())) {
                result.put(entry.getKey(), entry.getValue());
            }
        }
        if (extractValueFromSingleKeyModel) {
            if (result.size() == 1) {
                for (Map.Entry<String, Object> entry : result.entrySet()) {
                    return entry.getValue();
                }
            }
        }
        return result;
    }
Filters out undesired attributes from the given model. The return value
can be either another {@link Map}, or a single value object.
<p>
Default implementation removes {@link BindingResult} instances and
entries not included in the {@link #setRenderedAttributes(Set)
renderedAttributes} property.

@param model the model, as passed on to {@link #renderMergedOutputModel}
@return the object to be rendered
fastjson1-compatible/src/main/java/com/alibaba/fastjson/support/spring/annotation/FastJsonView.java