Live2D  Version 2.0
Live2D 描画エンジン APIリファレンス
 全て クラス ネームスペース 関数 ページ
クラス Json

簡易JSONパーサ [詳細]

#include <Json.h>

Jsonに対する継承グラフ
LDObject

Public メソッド

 Json ()
 Constructor. [詳細]
 
 Json (const char *buf, int length, int encoding=UTF8)
 
virtual ~Json ()
 Destructor. [詳細]
 
void release ()
 release [詳細]
 
bool parseFile (const char *filepath, int encoding=UTF8)
 Fileパスから直接ロードする [詳細]
 
bool parseBytes (const char *buf, int length, int encoding=UTF8)
 
ValuegetRoot ()
 
const char * getError ()
 
bool checkEOF ()
 

Static Public メソッド

static JsonparseFromBytes (const char *buf, int length, int encoding=UTF8)
 バイトデータから直接ロードする [詳細]
 
static JsonparseFromFile (const char *filepath, int encoding=UTF8)
 Fileパスから直接ロードする [詳細]
 
- Static Public メソッド inherited from LDObject
static void * operator new (l2d_size_t size)
 new オペレータ (Ownerを指定しない場合) [詳細]
 
static void operator delete (void *ptr)
 delete オペレータ (Ownerを指定しない場合) [詳細]
 
static void * operator new[] (l2d_size_t size)
 new[] オペレータ (Ownerを指定しない場合) [詳細]
 
static void operator delete[] (void *ptr)
 delete[] オペレータ (Ownerを指定しない場合) [詳細]
 
static void * operator new (l2d_size_t size, void *ptr)
 placement new オペレータ [詳細]
 
static void operator delete (void *ptr, void *ptr2)
 placement delete オペレータ [詳細]
 
static void * operator new (l2d_size_t size, MemoryParam *memParam)
 new オペレータ (デバッグ用) [詳細]
 
static void operator delete (void *ptr, MemoryParam *memParam)
 delete オペレータ (デバッグ用) [詳細]
 
static void * operator new (l2d_size_t size, MemoryParam *memParam, const char *filename, int line)
 new オペレータ (デバッグ用) [詳細]
 
static void operator delete (void *ptr, MemoryParam *memParam, const char *filename, int line)
 delete オペレータ (デバッグ用) [詳細]
 

Static Public 変数

static const int UTF8 = 0
 
static const int SJIS = 1
 
- Static Public 変数 inherited from LDObject
static int object_instanceCount = 0
 
static int object_totalCount = 0
 

Protected メソッド

bool parse_exe (const char *str, int len)
 
live2d::LDString parseString (const char *str, int len, int _pos, int *ret_endpos)
 次の「"」までの文字列をパースする。外部で開放する必要がある。 [詳細]
 
ValueparseObject (const char *buf, int len, int _pos, int *ret_endpos)
 Value*を解釈(posに最初の{は含まない) [詳細]
 
ValueparseArray (const char *buf, int len, int _pos, int *ret_endpos)
 Arrayの解釈(posに最初の[は含まない) [詳細]
 
ValueparseValue (const char *buf, int len, int _pos, int *ret_endpos2)
 1つのValue(float,String,Value*,Array,null,true,false)をパースする [詳細]
 

説明

簡易JSONパーサ


コンストラクタとデストラクタ

Json ( )

Constructor.


引数
buf->
length->
_encoding->
日付
2013/05/21
~Json ( )
virtual

Destructor.


日付
2013/05/21

関数

Value & getRoot ( )

戻り値
root ->
日付
2013/05/21
bool parse_exe ( const char *  str,
int  len 
)
protected

引数
str->
len->
戻り値
日付
2013/05/21
Value * parseArray ( const char *  buf,
int  len,
int  _pos,
int *  ret_endpos 
)
protected

Arrayの解釈(posに最初の[は含まない)


引数
buf->
len->
_pos->
@date2013/05/21
bool parseBytes ( const char *  buf,
int  length,
int  encoding = UTF8 
)

引数
buf->
length->
encoding->
戻り値
日付
2013/05/21
bool parseFile ( const char *  filepath,
int  encoding = UTF8 
)

Fileパスから直接ロードする


引数
filepath-> 読み込むファイルパス
encoding-> エンコード方法
戻り値
読み込み失敗した場合はfalse
日付
2013/05/21
Json * parseFromBytes ( const char *  buf,
int  length,
int  encoding = UTF8 
)
static

バイトデータから直接ロードする


引数
buf-> バッファデータ
length-> 読み込む長さ
encoding-> エンコード方法
戻り値
読み込んだデータ。失敗した場合はNULL
日付
2013/05/21
Json * parseFromFile ( const char *  filepath,
int  encoding = UTF8 
)
static

Fileパスから直接ロードする


引数
filepath-> 読み込むファイルパス
encoding-> エンコード方法
戻り値
読み込んだデータ。失敗した場合はNULL
日付
2013/05/21
Value * parseObject ( const char *  buf,
int  len,
int  _pos,
int *  ret_endpos 
)
protected

Value*を解釈(posに最初の{は含まない)


引数
buf->
len->
_pos->
ret_endpos->
戻り値
日付
2013/05/21
live2d::LDString parseString ( const char *  str,
int  len,
int  _pos,
int *  ret_endpos 
)
protected

次の「"」までの文字列をパースする。外部で開放する必要がある。


引数
str->
len->
_pos->
ret_endpos->
戻り値
日付
2013/05/21
Value * parseValue ( const char *  buf,
int  len,
int  _pos,
int *  ret_endpos2 
)
protected

1つのValue(float,String,Value*,Array,null,true,false)をパースする


引数
buf->
len->
_pos->
ret_endpos2->
戻り値
日付
2013/05/21
void release ( )

release


日付
2013/05/21

このクラスの説明は次のファイルから生成されました: