Examples of nestedSize()


Examples of cc.plural.jsonij.Value.nestedSize()

        JPathParser jPathParser = new JPathParser();
        JPath<?> path1 = jPathParser.parse("/store");
        path1.setRecordEvaluateTime(true);
        Value value1 = path1.evaluate(json);
        System.out.println(value1.getValueType() + "(" + value1.nestedSize() + "): " + value1.toJSON() + " (in " + path1.getLastEvaluateTime() + " ms)");

        JPath<?> path2 = jPathParser.parse("/store/book[?(@.title=\"Sword of Honour\")]/author");
        path2.setRecordEvaluateTime(true);
        Value value2 = path2.evaluate(json);
        System.out.println(value2.getValueType() + "(" + value2.nestedSize() + "): " + value2.toJSON() + " (in " + path2.getLastEvaluateTime() + " ms)");
View Full Code Here

Examples of cc.plural.jsonij.Value.nestedSize()

        System.out.println(value1.getValueType() + "(" + value1.nestedSize() + "): " + value1.toJSON() + " (in " + path1.getLastEvaluateTime() + " ms)");

        JPath<?> path2 = jPathParser.parse("/store/book[?(@.title=\"Sword of Honour\")]/author");
        path2.setRecordEvaluateTime(true);
        Value value2 = path2.evaluate(json);
        System.out.println(value2.getValueType() + "(" + value2.nestedSize() + "): " + value2.toJSON() + " (in " + path2.getLastEvaluateTime() + " ms)");

        JPath<?> path3 = jPathParser.parse("/book[?(@.author=\"J. R. R. Tolkien\")]/title");
        path3.setRecordEvaluateTime(true);
        Value value3 = path3.evaluate(value1);
        System.out.println(value3.getValueType() + "(" + value3.nestedSize() + "): " + value3.toJSON() + " (in " + path3.getLastEvaluateTime() + " ms)");
View Full Code Here

Examples of cc.plural.jsonij.Value.nestedSize()

        System.out.println(value2.getValueType() + "(" + value2.nestedSize() + "): " + value2.toJSON() + " (in " + path2.getLastEvaluateTime() + " ms)");

        JPath<?> path3 = jPathParser.parse("/book[?(@.author=\"J. R. R. Tolkien\")]/title");
        path3.setRecordEvaluateTime(true);
        Value value3 = path3.evaluate(value1);
        System.out.println(value3.getValueType() + "(" + value3.nestedSize() + "): " + value3.toJSON() + " (in " + path3.getLastEvaluateTime() + " ms)");

        JPath<?> path4 = jPathParser.parse("/store/book[?(@.price=8.99)]/title");
        path4.setRecordEvaluateTime(true);
        Value value4 = path4.evaluate(json);
        System.out.println(value4.getValueType() + "(" + value4.nestedSize() + "): " + value4.toJSON() + " (in " + path4.getLastEvaluateTime() + " ms)");
View Full Code Here

Examples of cc.plural.jsonij.Value.nestedSize()

        System.out.println(value3.getValueType() + "(" + value3.nestedSize() + "): " + value3.toJSON() + " (in " + path3.getLastEvaluateTime() + " ms)");

        JPath<?> path4 = jPathParser.parse("/store/book[?(@.price=8.99)]/title");
        path4.setRecordEvaluateTime(true);
        Value value4 = path4.evaluate(json);
        System.out.println(value4.getValueType() + "(" + value4.nestedSize() + "): " + value4.toJSON() + " (in " + path4.getLastEvaluateTime() + " ms)");
    }

    @Test
    public void testExpression1() throws IOException, ParserException {
        System.out.println("Test Expression1 - Single Expression Query String");
View Full Code Here

Examples of cc.plural.jsonij.Value.nestedSize()

        JPathParser jPathParser = new JPathParser();
        JPath<?> path1 = jPathParser.parse("/resume/misc\\/other[0]");
        path1.setRecordEvaluateTime(true);
        Value value1 = path1.evaluate(json);
        System.out.println(value1.getValueType() + "(" + value1.nestedSize() + "): " + value1.toJSON() + " (in " + path1.getLastEvaluateTime() + " ms)");

        assertEquals("Matrikon Asia-Pacific Heart Award 2005.", value1.getString());

        JPath<?> path2 = jPathParser.parse("/resume/employment[?(@.city=\"Sydney\")]/employer");
        path2.setRecordEvaluateTime(true);
View Full Code Here

Examples of cc.plural.jsonij.Value.nestedSize()

        assertEquals("Matrikon Asia-Pacific Heart Award 2005.", value1.getString());

        JPath<?> path2 = jPathParser.parse("/resume/employment[?(@.city=\"Sydney\")]/employer");
        path2.setRecordEvaluateTime(true);
        Value value2 = path2.evaluate(json);
        System.out.println(value1.getValueType() + "(" + value2.nestedSize() + "): " + value2.toJSON() + " (in " + path2.getLastEvaluateTime() + " ms)");

        assertEquals("IBM", value2.getString());
    }

    @Test
View Full Code Here

Examples of cc.plural.jsonij.Value.nestedSize()

        JPathParser jPathParser = new JPathParser();

        JPath<?> path1 = jPathParser.parse("/resume/employment[?(@.city=\"Newcastle\" && @.start date={\"day\":1,\"month\":8,\"year\":2003})]/employer");
        path1.setRecordEvaluateTime(true);
        Value value1 = path1.evaluate(json);
        System.out.println(value1.getValueType() + "(" + value1.nestedSize() + "): " + value1.toJSON() + " (in " + path1.getLastEvaluateTime() + " ms)");

        assertEquals("Matrikon", value1.getString());
    }

    @Test
View Full Code Here

Examples of jsonij.json.Value.nestedSize()

        long requestComplete = System.nanoTime();
        benchmark.reset();
        benchmark.setStartTime(requestStart);
        benchmark.setFinishTime(requestComplete);
        benchmark.setInstance(target);
        benchmark.setSteps(value.nestedSize());
        return value;
    }

    @Override
    public Value parse(Reader targetReader) throws IOException, ParserException {
View Full Code Here

Examples of jsonij.json.Value.nestedSize()

        int c;
        while((c = targetReader.read()) != -1) {
            instanceString += (char) c;
        }
        benchmark.setInstance(instanceString);
        benchmark.setSteps(value.nestedSize());
        return value;
    }
}
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.