dnf5-json will be used for building Fedora 40 and later. RHEL and Fedora < 40 will continue to use python3-libdnf via dnf-json.