|
libqutim
0.3.2.0
|
Typedefs | |
| typedef bool(* | generatorExt )(QString &err, QByteArray &res, const QVariant &val, int indent) |
Functions | |
| Q_DECL_IMPORT QByteArray | generate (const QVariant &data, int indent=0) |
| Q_DECL_IMPORT bool | generate (QByteArray &res, const QVariant &val, int indent=0, generatorExt cb=0, QString *err=0) |
| Q_DECL_IMPORT bool | generate (QByteArray &res, const QVariant &val, int indent, QString *err) |
| Q_DECL_IMPORT bool | isValidUtf8 (const uchar *s, int maxLen, bool zeroInvalid=false) |
| Q_DECL_IMPORT bool | isValidUtf8 (const QByteArray &data, bool zeroInvalid=false) |
| Q_DECL_IMPORT bool | isValidUtf8 (const char *s, int maxLen, bool zeroInvalid=false) |
| Q_DECL_IMPORT QVariant | parse (const QByteArray &data) |
| Q_DECL_IMPORT const uchar * | parseField (QString &fname, QVariant &fvalue, const uchar *s, int *maxLength) |
| Q_DECL_IMPORT const char * | parseField (QString &fname, QVariant &fvalue, const char *s, int *maxLength) |
| Q_DECL_IMPORT const uchar * | parseRecord (QVariant &res, const uchar *s, int *maxLength) |
| Q_DECL_IMPORT const char * | parseRecord (QVariant &res, const char *s, int *maxLength) |
| Q_DECL_IMPORT void | parseToProperties (const QByteArray &json, QObject *obj) |
| Q_DECL_IMPORT const uchar * | parseValue (QVariant &fvalue, const uchar *s, int *maxLength) |
| Q_DECL_IMPORT const char * | parseValue (QVariant &fvalue, const char *s, int *maxLength) |
| Q_DECL_IMPORT QString | quote (const QString &str) |
| Q_DECL_IMPORT const uchar * | skipBlanks (const uchar *s, int *maxLength) |
| Q_DECL_IMPORT const char * | skipBlanks (const char *s, int *maxLength) |
| Q_DECL_IMPORT const uchar * | skipRecord (const uchar *s, int *maxLength) |
| Q_DECL_IMPORT const char * | skipRecord (const char *s, int *maxLength) |
Namepsace provides both low and high levels for parsing and generating JavaScript Object Notations.
| typedef bool(* qutim_sdk_0_3::Json::generatorExt)(QString &err, QByteArray &res, const QVariant &val, int indent) |
| Q_DECL_IMPORT QByteArray qutim_sdk_0_3::Json::generate | ( | const QVariant & | data, |
| int | indent = 0 |
||
| ) |
Generate JSON string from QVariant.
| data | QVariant with data |
| indent | Identation of new lines |
| Q_DECL_IMPORT bool qutim_sdk_0_3::Json::generate | ( | QByteArray & | res, |
| const QVariant & | val, | ||
| int | indent = 0, |
||
| generatorExt | cb = 0, |
||
| QString * | err = 0 |
||
| ) |
| Q_DECL_IMPORT bool qutim_sdk_0_3::Json::generate | ( | QByteArray & | res, |
| const QVariant & | val, | ||
| int | indent, | ||
| QString * | err | ||
| ) |
| Q_DECL_IMPORT bool qutim_sdk_0_3::Json::isValidUtf8 | ( | const uchar * | s, |
| int | maxLen, | ||
| bool | zeroInvalid = false |
||
| ) |
Check if given string represents valid UTF-8 sequence.
| s | String to be checked |
| maxLen | Maximum length of string |
| zeroInvalid | If true check will be continued after finding null-symbol |
| Q_DECL_IMPORT bool qutim_sdk_0_3::Json::isValidUtf8 | ( | const QByteArray & | data, |
| bool | zeroInvalid = false |
||
| ) |
Convience fucntion for isValidUtf8.
| Q_DECL_IMPORT bool qutim_sdk_0_3::Json::isValidUtf8 | ( | const char * | s, |
| int | maxLen, | ||
| bool | zeroInvalid = false |
||
| ) |
Convience fucntion for isValidUtf8.
| Q_DECL_IMPORT QVariant qutim_sdk_0_3::Json::parse | ( | const QByteArray & | data | ) |
Parse JSON data to QVariant.
| data | String with JSON data |
| Q_DECL_IMPORT const uchar* qutim_sdk_0_3::Json::parseField | ( | QString & | fname, |
| QVariant & | fvalue, | ||
| const uchar * | s, | ||
| int * | maxLength | ||
| ) |
Parse one field (field-value pair)
| fname | Field's name |
| fvalue | Field's value |
| s | String with JSON data |
| maxLength | String length, will be changed after skiping |
| Q_DECL_IMPORT const char* qutim_sdk_0_3::Json::parseField | ( | QString & | fname, |
| QVariant & | fvalue, | ||
| const char * | s, | ||
| int * | maxLength | ||
| ) |
Convience fucntion for parseField.
| Q_DECL_IMPORT const uchar* qutim_sdk_0_3::Json::parseRecord | ( | QVariant & | res, |
| const uchar * | s, | ||
| int * | maxLength | ||
| ) |
Parse one record (list or object)
| res | Result of parsing |
| s | String with JSON data |
| maxLength | String length, will be changed after skiping |
| Q_DECL_IMPORT const char* qutim_sdk_0_3::Json::parseRecord | ( | QVariant & | res, |
| const char * | s, | ||
| int * | maxLength | ||
| ) |
Convience fucntion for parseRecord.
| Q_DECL_IMPORT void qutim_sdk_0_3::Json::parseToProperties | ( | const QByteArray & | json, |
| QObject * | obj | ||
| ) |
Parse JSON data and put it's values to object as properties.
| json | String with JSON data |
| obj | Object which properties will be changed to JSON's object |
| Q_DECL_IMPORT const uchar* qutim_sdk_0_3::Json::parseValue | ( | QVariant & | fvalue, |
| const uchar * | s, | ||
| int * | maxLength | ||
| ) |
Parse field value.
| fvalue | Result of parsing |
| s | String with JSON data |
| maxLength | String length, will be changed after skiping |
| Q_DECL_IMPORT const char* qutim_sdk_0_3::Json::parseValue | ( | QVariant & | fvalue, |
| const char * | s, | ||
| int * | maxLength | ||
| ) |
Convience fucntion for parseValue.
| Q_DECL_IMPORT QString qutim_sdk_0_3::Json::quote | ( | const QString & | str | ) |
This function quotes string to Json friendly format and surronds it by quotes;.
| str | String which would be quoted |
| Q_DECL_IMPORT const uchar* qutim_sdk_0_3::Json::skipBlanks | ( | const uchar * | s, |
| int * | maxLength | ||
| ) |
Skip blanks and comments.
| s | String with JSON data |
| maxLength | String length, will be changed after skiping |
| Q_DECL_IMPORT const char* qutim_sdk_0_3::Json::skipBlanks | ( | const char * | s, |
| int * | maxLength | ||
| ) |
Convience fucntion for skipBlanks.
| Q_DECL_IMPORT const uchar* qutim_sdk_0_3::Json::skipRecord | ( | const uchar * | s, |
| int * | maxLength | ||
| ) |
Skip one record.
The 'record' is either one full field (field: val) or one list/object.
| s | String with JSON data |
| maxLength | String length, will be changed after skiping |
| Q_DECL_IMPORT const char* qutim_sdk_0_3::Json::skipRecord | ( | const char * | s, |
| int * | maxLength | ||
| ) |
Convience fucntion for skipRecord.