kv_avro_raw_to_bytes()

#include <kvstore.h>

kv_error_t 
kv_avro_raw_to_bytes(const kv_value_t *value,
                     char *bytes,
                     uint64_t len);

Converts a kv_value_t to a raw byte array, which are assumed to be serialized Avro content. You must allocate the buffer. The buffer size can be determined using kv_get_value_size(), which will return a value that is slightly larger than required. The Avro schema associated with the value can be obtained using kv_avro_get_schema().

Parameters

value

The value parameter is the kv_value_t that you want to convert to a raw byte array.

bytes

The bytes parameter is buffer where you want the converted bytes to be placed.

len

The len parameter is is the size of the buffer. You can discover the required buffer size using kv_get_value_size().

See Also

Avro Management Functions