public static int of(Feature[] features) {
        if (features == null) {
            return 0;
        }
        
        int value = 0;
        
        for (Feature feature: features) {
            value |= feature.mask;
        }
        
        return value;
    }
@since 1.2.77
use HashMap instead of JSONObject, ArrayList instead of JSONArray
src/main/java/com/alibaba/fastjson/parser/Feature.java