Skip to main content

odin_rpc_bytes_to_json

enum OdinError odin_rpc_bytes_to_json(const uint8_t *bytes,
uint32_t bytes_length,
char *out_json,
uint32_t *out_json_length);

Overview

Helper function to deserialize MessagePack encoded data and convert it into a JSON string.

Parameters

NameTypeDescription
bytesconst uint8_t *MessagePack encoded data.
bytes_lengthuint32_tLength of the data.
out_jsonchar *Buffer to write the JSON string to.
out_json_lengthuint32_t *Input: buffer size, Output: actual string length.

Return Value

TypeDescription
OdinErrorODIN_ERROR_SUCCESS on success.