private static KeysetInfo keysetInfoFromJson(JsonObject json) throws IOException {
    KeysetInfo.Builder builder = KeysetInfo.newBuilder();
    if (json.has("primaryKeyId")) {
      builder.setPrimaryKeyId(getKeyId(json.get("primaryKeyId")));
    }
    if (json.has("keyInfo")) {
      JsonArray keyInfos = json.getAsJsonArray("keyInfo");
      for (int i = 0; i < keyInfos.size(); i++) {
        builder.addKeyInfo(keyInfoFromJson(keyInfos.get(i).getAsJsonObject()));
      }
    }
    return builder.build();
  }
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