Tianchi
v0.0.2 build 20130701
C++ library for Qt with VC & mingW
|
兼容 Qt 4.x 的 JSON文生成和解析类 更多...
#include <tcjson.h>
Public 类型 | |
enum | ValueTypeFlag { vtfObject = 0, vtfString = 1, vtfInt = 2, vtfDouble = 3, vtfBool = 4, vtfDateTime =5, vtfNull =6, vtfArray =99 } |
Public 成员函数 | |
TcJSONObject (const QString &key="") | |
int | type () const |
void | setType (int value) |
QString | key () const |
void | setKey (const QString &value) |
QVariant | value () const |
QVariant | value (const QString &key) const |
bool | value (const QString &key, QVariant &v) const |
bool | exists (const QString &key) const |
int | count () const |
TcJSONObject * | get (const QString &key) const |
QList< TcJSONObject * > | children () const |
TcJSONObject * | addObject (const QString &key="") |
TcJSONObject * | addArray (const QString &key) |
TcJSONObject * | addNull (const QString &key) |
TcJSONObject * | add (const QString &key, const char *value) |
TcJSONObject * | add (const QString &key, const QString &value) |
TcJSONObject * | add (const QString &key, int value) |
TcJSONObject * | add (const QString &key, double value) |
TcJSONObject * | add (const QString &key, bool value) |
TcJSONObject * | add (const QString &key, QDateTime value) |
TcJSONObject * | addNull () |
TcJSONObject * | add (const char *value) |
TcJSONObject * | add (const QString &value) |
TcJSONObject * | add (int value) |
TcJSONObject * | add (double value) |
TcJSONObject * | add (bool value) |
TcJSONObject * | add (QDateTime value) |
void | deleteChildren (const QString &key) |
void | clearChildren () |
void | clear () |
virtual QString | toString () const |
bool | fromString (QString jsonText) |
静态 Public 成员函数 | |
static QString | quote (const QString &Text) |
static QString | dequote (const QString &S) |
静态 Protected 成员函数 | |
static const wchar_t * | skip (const wchar_t *in) |
Protected 属性 | |
TcJSONObject * | parent |
int | m_index |
QMap< QString, TcJSONObject * > | m_list |
ValueTypeFlag | m_type |
QString | m_key |
QVariant | m_value |
兼容 Qt 4.x 的 JSON文生成和解析类