public static int parseJsonFeedFile(BufferedReader reader, int maxDocuments, Consumer<Predicate> consumer) throws IOException {
        int documentCount = 0;
        String line = reader.readLine();
        while (! line.startsWith("]") && documentCount < maxDocuments) {
            while (! line.contains("\"boolean\":")) {
                line = reader.readLine();
            }
            String booleanExpression = extractBooleanExpression(line);
            try {
                var predicate = Predicate.fromString(booleanExpression);
                consumer.accept(predicate);
                ++ documentCount;
            } catch (IllegalArgumentException e) {
                throw new IllegalArgumentException("Failed to parse predicate: " + booleanExpression, e);
            }
            line = reader.readLine();
        }
        return documentCount;
    }
Parses a feed file containing documents in JSON format. Its implementation is based on the following assumptions:
 1. Each document has single predicate field.
 2. The predicate is stored in a field named "boolean".
 3. There is just one "boolean" field on each line

 @author bjorncs
predicate-search/src/main/java/com/yahoo/search/predicate/utils/VespaFeedParser.java