带有无效元素的JSON
Boost Json with null elements
我正在尝试将Boost Ptree与Boost Json Parser一起使用。生成JSON消息时,我可以为True或False设置值并编译程序。
null使用哪个关键字?我找不到。
没有。不支持输出null。输出布尔值也不是。所有值均以字符串为单位。
来自json_parser_write.hpp
:
// Value or object or array
if (indent > 0 && pt.empty())
{
// Write value
Str data = create_escapes(pt.template get_value<Str>());
stream << Ch('"') << data << Ch('"');
}
相关文章:
- Mongodb c++驱动程序:如何查询元素的数组
- 将数组作为参数传递给函数安全吗?作为第三方职能部门,可以探索他们想要的之外的其他元素
- 使用strcpy将char数组的元素复制到另一个数组
- 在c++中使用nlohmann从类到json的转换
- 使用不带参数的函数访问结构元素
- 给定n个元素的m个集合.在C++中找到出现在最大集合数中的元素
- C++如何通过用户输入删除列表元素
- lower_bound()返回最后一个元素
- 基于多个条件处理地图中的所有元素
- 调整大小后指向元素值的指针unordered_map有效?
- JSONCPP 只用一个元素写入 JSON 数组
- 如何使用 boost 属性树来解析 boost 中 json 字符串中的数组中的元素?
- 对于Boost.Propertytree,有没有办法使用JSON点表示法来引用数组元素?
- 如何使用Qt访问JSON元素
- 带有无效元素的JSON
- 如何读取包含多个根元素的JSON文件
- 使用 boost 解析 json 文件中数组中的元素
- 如何完全删除json数组元素(使用jsoncpp)
- 如何使用json11库在json中添加子/嵌套元素
- 访问nlohmann json中的元素