nRF Connect SDK API 0.1.0
|
int json_common_gnss_data_add | ( | cJSON * | parent, |
struct cloud_data_gnss * | data, | ||
enum json_common_op_code | op, | ||
const char * | object_label, | ||
cJSON ** | parent_ref | ||
) |
#include <applications/asset_tracker_v2/src/cloud/cloud_codec/json_common.h>
Encode and add GNSS data to the parent object.
[out] | parent | Pointer to object that the encoded data is added to. |
[in] | data | Pointer to data that is to be encoded. |
[in] | op | Operation that is to be carried out. |
[in] | object_label | Name of the encoded object. |
[out] | parent_ref | Reference to an unallocated parent object pointer. Used when getting the pointer to the encoded data object when setting JSON_COMMON_GET_POINTER_TO_OBJECT as the opcode. The cJSON object pointed to after this function call must be manually freed after use. |