Convert QVariantHash to QVariantMap before JSON generation