private static int getKeyId(JsonElement element) throws IOException {
    long id;
    try {
      id = JsonParser.getParsedNumberAsLongOrThrow(element);
    } catch (NumberFormatException e) {
      throw new IOException(e);
    }
    if (id > MAX_KEY_ID || id < MIN_KEY_ID) {
      throw new IOException("invalid key id");
    }
    // casts large unsigned int32 numbers to negative int32 numbers
    return (int) element.getAsLong();
  }
Static method to create a JsonKeysetReader from a {@link Path}.

<p>Note: the file path won't be read until {@link JsonKeysetReader#read} or {@link
JsonKeysetReader#readEncrypted} is called.

<p>This method only works on Android API level 26 or newer.

@deprecated Method should be inlined.
java_src/src/main/java/com/google/crypto/tink/JsonKeysetReader.java