code: public static List<Specification> parseInputSpecification(InputStream in) {
          List<Specification> monitorables = new ArrayList<>();
          try {
              ObjectMapper mapper = new ObjectMapper();
              JsonNode metrics = mapper.readTree(in).path("metrics");
              for (JsonNode node : metrics) {
                  monitorables.add(specificationAdapter.fromJson(node));
              }
          } catch (Exception e) {
              logger.error(String.format("Unexpected JSON format%n%s", e.getMessage()));
          }
          return monitorables;
      }
docs: parse a configuration stream (external file or resources)