class Json {

  public static ObjectNode readObjectNode(byte[] data) throws IOException {
    // Read data into a tree
    JsonNode root = MAPPER.readTree(data);
    // Check that we have an object, because treeToValue won't
    if (!root.isObject()) {
      throw new IOException("json value is not an object");
    }
    return (ObjectNode) root;
  }

}