JSON パーサー. [詳細]
#include <PGJsonParser.h>
Public メソッド | |
PGJsonParser () | |
コンストラクタ | |
virtual | ~PGJsonParser () |
デストラクタ | |
bool | ParseCommand (PGJsonCommands *jo, const SGString &json) |
コマンド文の解析 | |
bool | ParseDialog (PGJsonResource *jo, const SGString &json, bool shard) |
ダイアログ句の解析 | |
bool | MakeUpdateCommand (SGString &json, PGJsonResource *jo, bool allflag=false) |
UPDATE コマンドの作成. | |
PGJsonObject * | ParseObject (JsonParser &jp, PGJsonObject *parent, bool shard) |
オブジェクト句の解析 | |
int | ParseList (PGJsonObject *jo, JsonParser &jp, bool shard) |
複数形句の解析 | |
Static Public メソッド | |
static PGJsonObject * | CreateObject (const SGString &type, const SGString &layout, PGJsonObject *parent) |
オブジェクトの作成 | |
static PGJsonObject * | CreateCommand (const SGString &type) |
コマンドの作成 |
JSON パーサー.
JSON 文字列を解析してオブジェクトに変換します。
PGJsonParser | ( | ) |
コンストラクタ
~PGJsonParser | ( | ) | [virtual] |
デストラクタ
bool ParseCommand | ( | PGJsonCommands * | jo, | |
const SGString & | json | |||
) |
コマンド文の解析
JSON 文字列中のコマンド文を解析します。
jo | コマンド JSON オブジェクト | |
json | JSON 文字列 |
true | 正常終了 | |
false | エラー |
bool ParseDialog | ( | PGJsonResource * | jo, | |
const SGString & | json, | |||
bool | shard | |||
) |
ダイアログ句の解析
JSON 文字列中のダイアログ句を解析します。
jo | ダイアログ JSON オブジェクト | |
json | JSON 文字列 | |
shard | 共有タイプのダイアログの場合はtrueを指定します。 trueを指定すると NotifyList の設定に関わらず全ての要素をロードします。 |
true | 正常終了 | |
false | エラー |
bool MakeUpdateCommand | ( | SGString & | json, | |
PGJsonResource * | jo, | |||
bool | allflag = false | |||
) |
UPDATE コマンドの作成.
UPDATE コマンドの JSON 文字列を作ります。
json | JSON 文字列 | |
jo | ダイアログ JSON オブジェクト | |
allflag |
|
true | 正常終了 | |
false | エラー |
PGJsonObject * CreateObject | ( | const SGString & | type, | |
const SGString & | layout, | |||
PGJsonObject * | parent | |||
) | [static] |
オブジェクトの作成
JSON オブジェクトを作る。
type | オブジェクトの種別 |
PGJsonObject * CreateCommand | ( | const SGString & | type | ) | [static] |
コマンドの作成
JSON コマンドオブジェクトを作ります。
type | オブジェクトの種別 |
PGJsonObject * ParseObject | ( | JsonParser & | jp, | |
PGJsonObject * | parent, | |||
bool | shard | |||
) |
オブジェクト句の解析
JSON オブジェクトを解析します。
jp | JSON 解析情報 | |
shard | 共有タイプのダイアログの場合はtrueを指定します。 trueを指定すると NotifyList の設定に関わらず全ての要素をロードします。 |
int ParseList | ( | PGJsonObject * | jo, | |
JsonParser & | jp, | |||
bool | shard | |||
) |
複数形句の解析
コマンドやオブジェクトの複数形の句を解析します。
jo | JSON オブジェクト | |
jp | JSON 解析情報 | |
shard | 共有タイプのダイアログの場合はtrueを指定します。 trueを指定すると NotifyList の設定に関わらず全ての要素をロードします。 |