You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
1.1 KiB
C
36 lines
1.1 KiB
C
|
5 years ago
|
/******************************************************************************
|
||
|
|
Copyright(C):2015~2018 hzleaper
|
||
|
|
FileName:QZkJsonParser.h
|
||
|
|
Author:zhikun wu
|
||
|
|
Email:zk.wu@hzleaper.com
|
||
|
|
Tools:vs2010 pc on company
|
||
|
|
Created:2015/04/07
|
||
|
|
History:7:4:2015 10:10
|
||
|
|
*******************************************************************************/
|
||
|
|
#ifndef QZKJSONPARSER_H
|
||
|
|
#define QZKJSONPARSER_H
|
||
|
|
|
||
|
|
#include <QtCore/QJsonDocument>
|
||
|
|
#include <QtCore/QJsonObject>
|
||
|
|
#include <QtCore/qjsonarray.h>
|
||
|
|
#include <QtCore/QTextStream>
|
||
|
|
#include <QtCore/QFile>
|
||
|
|
|
||
|
|
class QZkJsonParser
|
||
|
|
{
|
||
|
|
public:
|
||
|
|
QZkJsonParser();
|
||
|
|
~QZkJsonParser();
|
||
|
|
public:
|
||
|
|
static QJsonObject ReadJsonObject(const QString& szFile, int* perror = NULL);
|
||
|
|
static bool WriteJsonObject(const QString& szFile, QJsonObject& objJson);
|
||
|
|
static QJsonObject ReadJsonBinary(const QString& szFile);
|
||
|
|
static bool WriteJsonBinary(const QString& szFile, QJsonObject& objJson);
|
||
|
|
static QJsonObject ReadJsonAuto(const QString& szFile, int* pError = NULL);
|
||
|
|
static QByteArray JsonText(const QJsonObject& jsonObj);
|
||
|
|
private:
|
||
|
|
|
||
|
|
};
|
||
|
|
|
||
|
|
#endif // QZKJSONPARSER_H
|