Write a fragment of a hexadecimal representation of binary data.
MCO_RET mcorest_api_json_write_hex_string_part( mcorest_api_json_write_ctx_t *ctx,
const void *b,
size_t len );
| ctx | Pointer to the JSON write context structure |
| b | The data to write |
| len | The length of the data array |
This function writes a fragment of a hexadecimal representation of binary data.
| MCO_S_OK = 0 | Success |
| MCO_E_REST_* | Any of the Web Services Error Codes |
static void print_hex_string_parts(mcorest_api_json_write_ctx_t *jctx,
const char *part1,
const char *part2)
{
mcorest_api_json_write_object_begin(jctx);
mcorest_api_json_write_key(jctx, "hex_string_parts");
mcorest_api_json_write_string_begin(jctx);
mcorest_api_json_write_hex_string_part(jctx, part1, strlen(part1));
mcorest_api_json_write_hex_string_part(jctx, part2, strlen(part2));
mcorest_api_json_write_string_end(jctx);
...
mcorest_api_json_write_object_end(jctx);
...
}