@Override
 public String getPathFragment() {
   return new StringBuilder()
       .append("[")
       .append(Utils.join(", ", "'", properties))
       .append("]")
       .toString();
 }
示例#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);
    }
  }