表示 JSON 格式的数据结构。更多...
#include <json.h>
表示JSON格式的数据结构。
限制:UTF-8 不受支持。ASCII 以外的代码点无效。
示例
object[
"key"] = 
String(
"Value");
 
JsonObject 对象
定义: json.h:618
JsonArray 数组
定义: json.h:619
JsonString 字符串
定义: json.h:623
  ◆ Json() [1/11]
◆ Json() [2/11]
◆ Json() [3/11]
◆ Json() [4/11]
◆ Json() [5/11]
template<typename T , Value::ValueKind kind>
 
 
◆ Json() [6/11]
◆ Json() [7/11]
◆ Json() [8/11]
◆ Json() [9/11]
◆ Json() [10/11]
  
  | 
        
          | xgboost::Json::Json | ( | Json const & | 其他 | ) |  |  | 默认 | 
 
 
◆ Json() [11/11]
  
  | 
        
          | xgboost::Json::Json | ( | Json && | 其他 | ) |  |  | inlinenoexcept | 
 
 
◆ Dump() [1/4]
template<typename Container = std::string>
  
  | 
        
          | static Container xgboost::Json::Dump | ( | Json | json | ) |  |  | inlinestatic | 
 
 
◆ Dump() [2/4]
◆ Dump() [3/4]
  
  | 
        
          | static void xgboost::Json::Dump | ( | Json | json, |  
          |  |  | std::string * | out, |  
          |  |  | std::ios::openmode | mode = std::ios::out |  
          |  | ) |  |  |  | static | 
 
编码 JSON 对象。可选参数 mode 用于选择文本或二进制 (ubjson) 输出。
 
 
◆ Dump() [4/4]
  
  | 
        
          | static void xgboost::Json::Dump | ( | Json | json, |  
          |  |  | std::vector< char > * | out, |  
          |  |  | std::ios::openmode | mode = std::ios::out |  
          |  | ) |  |  |  | static | 
 
 
◆ GetValue() [1/3]
  
  | 
        
          | Value& xgboost::Json::GetValue | ( |  | ) | & |  | inline | 
 
 
◆ GetValue() [2/3]
  
  | 
        
          | Value const& xgboost::Json::GetValue | ( |  | ) | && |  | inline | 
 
 
◆ GetValue() [3/3]
  
  | 
        
          | Value const& xgboost::Json::GetValue | ( |  | ) | const & |  | inline | 
 
 
◆ Load() [1/2]
◆ Load() [2/2]
  
  | 
        
          | static Json xgboost::Json::Load | ( | StringView | 字符串, |  
          |  |  | std::ios::openmode | mode = std::ios::in |  
          |  | ) |  |  |  | static | 
 
解码 JSON 对象。可选参数 mode 用于选择文本或二进制 (ubjson) 输入。
 
 
◆ operator=() [1/10]
  
  | 
        
          | Json& xgboost::Json::operator= | ( | Json && | 其他 | ) |  |  | inlinenoexcept | 
 
 
◆ operator=() [2/10]
  
  | 
        
          | Json& xgboost::Json::operator= | ( | Json const & | 其他 | ) |  |  | 默认 | 
 
 
◆ operator=() [3/10]
◆ operator=() [4/10]
◆ operator=() [5/10]
◆ operator=() [6/10]
◆ operator=() [7/10]
◆ operator=() [8/10]
◆ operator=() [9/10]
◆ operator=() [10/10]
template<typename T , Value::ValueKind kind>
 
 
◆ operator==()
  
  | 
        
          | bool xgboost::Json::operator== | ( | Json const & | rhs | ) | const |  | inline | 
 
 
◆ operator[]() [1/2]
  
  | 
        
          | Json& xgboost::Json::operator[] | ( | int | 索引 | ) | const |  | inline | 
 
 
◆ operator[]() [2/2]
  
  | 
        
          | Json& xgboost::Json::operator[] | ( | std::string const & | key | ) | const |  | inline | 
 
 
◆ Ptr()
◆ operator<<
  
  | 
        
          | std::ostream& operator<< | ( | std::ostream & | os, |  
          |  |  | Json const & | j |  
          |  | ) |  |  |  | 友元 | 
 
 
此类的文档由以下文件生成
- /home/docs/checkouts/readthedocs.org/user_builds/xgboost/checkouts/stable/include/xgboost/json.h