Exemplo n.º 1
0
 @Override
 public String getPathFragment() {
   return new StringBuilder()
       .append("[")
       .append(Utils.join(", ", "'", properties))
       .append("]")
       .toString();
 }
Exemplo n.º 2
0
  @Test
  public void issue_24() {

    InputStream is = null;
    try {
      is = this.getClass().getResourceAsStream("/issue_24.json");

      // Object o = JsonPath.read(is, "$.project[?(@.template.@key == 'foo')].field[*].@key");
      Object o = read(is, "$.project.field[*].@key");
      // Object o = JsonPath.read(is, "$.project.template[?(@.@key == 'foo')].field[*].@key");

      is.close();
    } catch (Exception e) {
      // e.printStackTrace();
      Utils.closeQuietly(is);
    }
  }