| 138 | } |
| 139 | |
| 140 | void array_example() |
| 141 | { |
| 142 | json a(jsoncons::json_array_arg); |
| 143 | a.push_back("hello"); |
| 144 | a.push_back("world"); |
| 145 | |
| 146 | json j(jsoncons::json_object_arg); |
| 147 | j["array"] = std::move(a); |
| 148 | |
| 149 | std::vector<char> buffer; |
| 150 | bson::encode_bson(j, buffer); |
| 151 | |
| 152 | std::cout << jsoncons::byte_string_view(buffer) << "\n\n"; |
| 153 | } |
| 154 | |
| 155 | void utf8_string_example() |
| 156 | { |
no test coverage detected