NIM PC Cross Platform SDK
载入中...
搜索中...
未找到
nim_cpp_wrapper_util::Json::Features类 参考

Configuration passed to reader and writer. This configuration object can be used to force the Reader or Writer to behave in a standard conforming way. 更多...

#include <json_features.h>

Public 成员函数

 Features ()
 Initialize the configuration like JsonConfig::allFeatures;
 

静态 Public 成员函数

static Features all ()
 A configuration that allows all features and assumes all strings are UTF-8.
 
static Features strictMode ()
 A configuration that is strictly compatible with the JSON specification.
 

Public 属性

bool allowComments_ {true}
 true if comments are allowed. Default: true.
 
bool strictRoot_ {false}
 
bool allowDroppedNullPlaceholders_ {false}
 true if dropped null placeholders are allowed. Default: false.
 
bool allowNumericKeys_ {false}
 true if numeric object key are allowed. Default: false.
 

详细描述

Configuration passed to reader and writer. This configuration object can be used to force the Reader or Writer to behave in a standard conforming way.

构造及析构函数说明

◆ Features()

nim_cpp_wrapper_util::Json::Features::Features ( )
default

Initialize the configuration like JsonConfig::allFeatures;

成员函数说明

◆ all()

Features nim_cpp_wrapper_util::Json::Features::all ( )
static

A configuration that allows all features and assumes all strings are UTF-8.

  • C & C++ comments are allowed
  • Root object can be any JSON value
  • Assumes Value strings are encoded in UTF-8

◆ strictMode()

Features nim_cpp_wrapper_util::Json::Features::strictMode ( )
static

A configuration that is strictly compatible with the JSON specification.

  • Comments are forbidden.
  • Root object must be either an array or an object value.
  • Assumes Value strings are encoded in UTF-8

类成员变量说明

◆ allowComments_

bool nim_cpp_wrapper_util::Json::Features::allowComments_ {true}

true if comments are allowed. Default: true.

◆ allowDroppedNullPlaceholders_

bool nim_cpp_wrapper_util::Json::Features::allowDroppedNullPlaceholders_ {false}

true if dropped null placeholders are allowed. Default: false.

◆ allowNumericKeys_

bool nim_cpp_wrapper_util::Json::Features::allowNumericKeys_ {false}

true if numeric object key are allowed. Default: false.

◆ strictRoot_

bool nim_cpp_wrapper_util::Json::Features::strictRoot_ {false}

true if root must be either an array or an object value. Default: false.


该类的文档由以下文件生成: