public static int config(int features, Feature feature, boolean state) {
        if (state) {
            features |= feature.mask;
        } else {
            features &= ~feature.mask;
        }

        return features;
    }
@since 1.2.77
use HashMap instead of JSONObject, ArrayList instead of JSONArray
src/main/java/com/alibaba/fastjson/parser/Feature.java