get_json_object()
的设置。 更多...
#include <json.hpp>
◆ get_allow_single_quotes()
CUDF_HOST_DEVICE bool cudf::get_json_object_options::get_allow_single_quotes |
( |
| ) |
const |
|
inline |
根据是否允许使用单引号表示字符串来返回 true/false。
- 返回值
- 如果允许使用单引号则为 true,否则为 false。
定义位于文件 json/json.hpp 的第 56 行。
◆ get_missing_fields_as_nulls()
CUDF_HOST_DEVICE bool cudf::get_json_object_options::get_missing_fields_as_nulls |
( |
| ) |
const |
|
inline |
未包含在对象中的字段是否应解释为 null。
设置为 true 时,如果查询对象中不包含的字段,则返回 null。
当 missing_fields_as_nulls 为 OFF 时
输入 = {"a" : [{"x": "1", "y": "2"}, {"x": "3"}]}
查询 = $.a[*].y
输出 = ["2"]
当 missing_fields_as_nulls 为 ON 时
输入 = {"a" : [{"x": "1", "y": "2"}, {"x": "3"}]}
查询 = $.a[*].y
输出 = ["2", null]
- 返回值
- 如果将缺失字段解释为 null 则为 true。
定义位于文件 json.hpp 的第 111 行。
◆ get_strip_quotes_from_single_strings()
CUDF_HOST_DEVICE bool cudf::get_json_object_options::get_strip_quotes_from_single_strings |
( |
| ) |
const |
|
inline |
根据返回的单个字符串值是否去除引号来返回 true/false。
设置为 true 时,如果给定行的返回值是单个字符串(不是对象或字符串数组),则从字符串中去除引号并仅返回字符串内容本身。示例
当 strip_quotes_from_single_strings 为 OFF 时
输入 = {"a" : "b"}
查询 = $.a
输出 = "b"
当 strip_quotes_from_single_strings 为 ON 时
输入 = {"a" : "b"}
查询 = $.a
输出 = b
- 返回值
- 如果返回的单个字符串值去除引号则为 true。
定义位于文件 json.hpp 的第 85 行。
◆ set_allow_single_quotes()
void cudf::get_json_object_options::set_allow_single_quotes |
( |
bool |
_allow_single_quotes | ) |
|
|
inline |
设置是否允许使用单引号表示字符串。
- 参数
-
_allow_single_quotes | 表示期望行为的 bool 值。 |
定义位于文件 json.hpp 的第 121 行。
◆ set_missing_fields_as_nulls()
void cudf::get_json_object_options::set_missing_fields_as_nulls |
( |
bool |
_missing_fields_as_nulls | ) |
|
|
inline |
设置是否将缺失字段解释为 null。
- 参数
-
_missing_fields_as_nulls | 表示期望行为的 bool 值。 |
定义位于文件 json.hpp 的第 141 行。
◆ set_strip_quotes_from_single_strings()
void cudf::get_json_object_options::set_strip_quotes_from_single_strings |
( |
bool |
_strip_quotes_from_single_strings | ) |
|
|
inline |
设置返回的单个字符串值是否去除引号。
- 参数
-
_strip_quotes_from_single_strings | 表示期望行为的 bool 值。 |
定义位于文件 json.hpp 的第 131 行。
本类的文档由以下文件生成