添加注释
This commit is contained in:
parent
a0a2e95ccf
commit
9be3ce881d
|
@ -89,25 +89,30 @@ protected:
|
|||
~json();
|
||||
|
||||
public:
|
||||
// parse/un-parse ...
|
||||
bool attach_text(char* json_txt);
|
||||
void clear(bool as_array = false);
|
||||
std::string to_string(void);
|
||||
|
||||
// attributes ...
|
||||
std::string& key(void);
|
||||
bool is_array(void);
|
||||
bool is_leaf_node(void); // whether this object is a leaf node contains final value
|
||||
|
||||
// value access ...
|
||||
bool get_value(const char* key, bool& val);
|
||||
bool get_value(const char* key, int& val);
|
||||
bool get_value(const char* key, double& val);
|
||||
bool get_value(const char* key, std::string& val);
|
||||
bool get_value(const char* key, json*& val);
|
||||
|
||||
// enumeration ...
|
||||
size_t children(void); // return children count if was object or array, or else -1 returned
|
||||
json* child(size_t ind);
|
||||
json* first_child(void);
|
||||
json* next_child(void);
|
||||
|
||||
// change the item matched 'key', or else add a new item
|
||||
// change the item matching 'key', otherwise add a new item
|
||||
bool set_value(const char* key, bool val);
|
||||
bool set_value(const char* key, int val);
|
||||
bool set_value(const char* key, double val);
|
||||
|
|
Loading…
Reference in New Issue