Skip to content
Snippets Groups Projects
json.h 690 B
Newer Older
akiraohgaki's avatar
akiraohgaki committed
/**
 * A library for Qt app
 *
 * LICENSE: The GNU Lesser General Public License, version 3.0
 *
 * @author      Akira Ohgaki <akiraohgaki@gmail.com>
 * @copyright   Akira Ohgaki
 * @license     https://opensource.org/licenses/LGPL-3.0  The GNU Lesser General Public License, version 3.0
 * @link        https://github.com/akiraohgaki/qt-libs
 */

#pragma once
akiraohgaki's avatar
akiraohgaki committed

#include <QObject>

akiraohgaki's avatar
akiraohgaki committed
namespace utils {
akiraohgaki's avatar
akiraohgaki committed

class Json : public QObject
{
    Q_OBJECT

public:
    explicit Json(QObject *parent = 0);

    static QString convertObjToStr(const QJsonObject &jsonObj);
akiraohgaki's avatar
akiraohgaki committed
    static QJsonObject convertStrToObj(const QString &json);
    static bool isValid(const QString &json);
akiraohgaki's avatar
akiraohgaki committed
} // namespace utils