Skip to main content

odin_rpc_json_to_bytes

enum OdinError odin_rpc_json_to_bytes(const char *json,
uint8_t *out_bytes,
uint32_t *out_bytes_length);

Overview

Helper function to convert a JSON string into a MessagePack encoded byte array.

Parameters

NameTypeDescription
jsonconst char *The JSON string to convert.
out_bytesuint8_t *Buffer to write the MessagePack data to.
out_bytes_lengthuint32_t *Input: buffer size, Output: actual data length.

Return Value

TypeDescription
OdinErrorODIN_ERROR_SUCCESS on success.