private static List<String> parseTopicsData(int version, JsonValue js) throws JsonMappingException {
        switch (version) {
            case 1:
                List<String> results = new ArrayList<>();
                Optional<JsonValue> partitionsSeq = js.asJsonObject().get("topics");
                if (partitionsSeq.isPresent()) {
                    Iterator<JsonValue> iter = partitionsSeq.get().asJsonArray().iterator();
                    while (iter.hasNext()) {
                        results.add(iter.next().asJsonObject().apply("topic").to(STRING));
                    }
                }
                return results;

            default:
                throw new AdminOperationException("Not supported version field value " + version);
        }
    }
The entry point for the --cancel command.

@param adminClient           The AdminClient to use.
@param jsonString            The JSON string to use for the topics and partitions to cancel.
@param preserveThrottles     True if we should avoid changing topic or broker throttles.
@param timeoutMs             The maximum time in ms to wait for log directory
                             replica assignment to begin.
@param time                  The Time object to use.

@return                      A tuple of the partition reassignments that were cancelled,
                             and the replica movements that were cancelled.
tools/src/main/java/org/apache/kafka/tools/reassign/ReassignPartitionsCommand.java