Instead of the custom macros, use K_PLUGIN_CLASS_WITH_JSON directly.
Task: https://phabricator.kde.org/T14542