JsonElement::has(const std::string_view key) const
函数功能
当JsonElement节点非空且存在对应的key时,返回true,否则返回false。
函数定义
bool JsonElement::has(const std::string_view key) const;
参数说明
参数名 |
描述 |
取值范围 |
输入/输出 |
|---|---|---|---|
key |
要查询是否存在的节点的key。 |
合法的字符串key |
输入 |
返回值
- 成功:返回“true”,表示存在该节点。
- 失败:返回“false”,表示节点为空或者不存在该节点。
父主题: 函数定义