public static Filter parse(String filter){
        return FilterCompiler.compile(filter);
    }
@Test
    public void criteria_can_be_parsed() {

        Filter criteria = Filter.parse("[?(@.foo == 'baar')]");
        assertThat(criteria.toString()).isEqualTo("[?(@['foo'] == 'baar')]");

        criteria = Filter.parse("[?(@.foo)]");
        assertThat(criteria.toString()).isEqualTo("[?(@['foo'])]");
    }