/****************************************************************************** * SPDX-FileCopyrightText: 2018 Kitsune Ral * * SPDX-License-Identifier: LGPL-2.1-or-later */ #include "converters.h" #include using namespace Quotient; QJsonValue JsonConverter::dump(const QVariant& v) { return QJsonValue::fromVariant(v); } QVariant JsonConverter::load(const QJsonValue& jv) { return jv.toVariant(); } QJsonObject JsonConverter::dump(const QVariantHash& vh) { return QJsonObject::fromVariantHash(vh); } QVariantHash JsonConverter::load(const QJsonValue& jv) { return jv.toObject().toVariantHash(); }