| 159 | } |
| 160 | |
| 161 | void encode_cbor_byte_string() |
| 162 | { |
| 163 | // construct byte string value |
| 164 | json j(byte_string{'H','e','l','l','o'}); |
| 165 | |
| 166 | std::vector<uint8_t> buf; |
| 167 | cbor::encode_cbor(j, buf); |
| 168 | |
| 169 | std::cout << byte_string_view(buf) << "\n\n"; |
| 170 | |
| 171 | json j2 = cbor::decode_cbor<json>(buf); |
| 172 | std::cout << "(2) " << j2 << '\n'; |
| 173 | } |
| 174 | |
| 175 | void encode_byte_string_with_encoding_hint() |
| 176 | { |
no test coverage detected