private static void validateConfiguration(JsonConfiguration config) {
        Set<JsonFeature> unknown = null;
        Iterable<JsonFeature> features = config.getFeatures();
        for(JsonFeature feature : features) {
            if (!KNOWN_FEATURES.contains(feature)) {
                if (unknown == null) {
                    unknown = new HashSet<JsonFeature>();
                }
                unknown.add(feature);
            }
        }
        if (unknown != null && !unknown.isEmpty()) {
            throw new IllegalArgumentException("Specified config contains unknown features :"+unknown);
        }
    }