static Map<TopicPartition, List<Long>> parseOffsetJsonStringWithoutDedup(String jsonData) throws JsonProcessingException {
        JsonValue js = Json.parseFull(jsonData)
            .orElseThrow(() -> new AdminOperationException("The input string is not a valid JSON"));

        Optional<JsonValue> version = js.asJsonObject().get("version");

        return parseJsonData(version.isPresent() ? version.get().to(INT) : EARLIEST_VERSION, js);
    }
A command for delete records of the given partitions down to the specified offset.
tools/src/main/java/org/apache/kafka/tools/DeleteRecordsCommand.java