2017-07-13 10:26:03 +02:00
|
|
|
/*
|
|
|
|
* jsonutils.h, part of VCMI engine
|
|
|
|
*
|
|
|
|
* Authors: listed in file AUTHORS in main folder
|
|
|
|
*
|
|
|
|
* License: GNU General Public License v2.0 or later
|
|
|
|
* Full text of license available in license.txt file, in main folder
|
|
|
|
*
|
|
|
|
*/
|
2013-09-21 21:29:26 +03:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <QVariant>
|
|
|
|
|
2022-07-29 08:52:39 +02:00
|
|
|
VCMI_LIB_NAMESPACE_BEGIN
|
|
|
|
|
2024-02-11 23:09:01 +02:00
|
|
|
class JsonNode;
|
|
|
|
|
2013-09-21 21:29:26 +03:00
|
|
|
namespace JsonUtils
|
|
|
|
{
|
2018-04-13 07:34:58 +02:00
|
|
|
QVariant toVariant(const JsonNode & node);
|
|
|
|
QVariant JsonFromFile(QString filename);
|
2013-09-21 21:29:26 +03:00
|
|
|
|
2018-04-13 07:34:58 +02:00
|
|
|
JsonNode toJson(QVariant object);
|
|
|
|
void JsonToFile(QString filename, QVariant object);
|
2017-07-13 10:26:03 +02:00
|
|
|
}
|
2022-07-29 08:52:39 +02:00
|
|
|
|
|
|
|
VCMI_LIB_NAMESPACE_END
|