Package cc.plural.jsonij.jpath

Examples of cc.plural.jsonij.jpath.JPathParser$JPathReader


        @Test
    public void testReadUnionIndex() throws Exception {
        System.out.println("readAttributeIndex");
        String testString = "[1,2,3,4,222,34,900,345,122,22,34,44,55,555,321,22,2]";
        JPathParser.JPathReader target = new JPathParser.JPathReader(testString);
        JPathParser instance = new JPathParser();
        PredicateComponent result = instance.readPredicate(target);
        PredicateComponent expResult = new UnionPredicate(new int[] {1,2,3,4,222,34,900,345,122,22,44,55,555,321});
        assertEquals(expResult, result);
    }
View Full Code Here


    @Test
    public void testFunctionPredicate() throws Exception {
        System.out.println("testFunctionPredicate");
        String testString = "[?(  regex(   @.firstName   ,   [    \"RAH\",   null]  ))]";
        JPathParser.JPathReader target = new JPathParser.JPathReader(testString);
        JPathParser instance = new JPathParser();
        PredicateComponent result = instance.readPredicate(target);
        System.out.println(result);
    }
View Full Code Here

        @Test
    public void testFunctionPredicateCombined() throws Exception {
        System.out.println("testFunctionPredicateCombined");
        String testString = "[?(regex(@.firstName,\"RAH\") & @.lastName=\"HAR\")]";
        JPathParser.JPathReader target = new JPathParser.JPathReader(testString);
        JPathParser instance = new JPathParser();
        PredicateComponent result = instance.readPredicate(target);
        System.out.println(result);
    }
View Full Code Here

TOP

Related Classes of cc.plural.jsonij.jpath.JPathParser$JPathReader

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.