Package com.gistlabs.mechanize.document.json.node

Examples of com.gistlabs.mechanize.document.json.node.JsonNode.find()


  @Test
  public void testAttributeTilda() throws Exception {
    JsonNode node = build("{ \"a\" : 2, \"b\" : { \"x\" : \"y foo bar\" }, \"results\" : [ { \"a\" : 1 }, { \"b\" : 2 } ] }");

    assertNotNull(node.find("b[x~=\"y\"]"));
    assertEquals(1, node.findAll("b[x~=\"foo\"]").size());
    assertEquals(1, node.findAll("b[x~=\"bar\"]").size());

    assertEquals(0, node.findAll("b[x~=\"baz\"]").size());
  }
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.