class BoolParser {

    public static Bool parseFirst(JSONObject json, String... keys) {
        String first = first(Arrays.asList(keys), json::has);
        return first != null ? new Bool(json.optBoolean(first)) : new NullBool();
    }

}