public static IsJsonObject jsonObject()

in jackson/src/main/java/com/spotify/hamcrest/jackson/IsJsonObject.java [73:83]


  public static IsJsonObject jsonObject(final ObjectNode objectNode) {
    final Iterator<Map.Entry<String, JsonNode>> fields = objectNode.fields();
    final LinkedHashMap<String, Matcher<? super JsonNode>> entryMatchers = new LinkedHashMap<>();

    while (fields.hasNext()) {
      final Map.Entry<String, JsonNode> field = fields.next();
      entryMatchers.put(field.getKey(), createNodeMatcher(field.getValue()));
    }

    return new IsJsonObject(entryMatchers);
  }