nRF Connect SDK API 0.1.0
Loading...
Searching...
No Matches

◆ json_add_obj()

void json_add_obj ( cJSON *  parent,
const char *  str,
cJSON *  item 
)

Associate a child object with a parent.

This API is expected to be called after data has been added to the child item. If this API fails to add the child item to the parent it will free the child item. Due to this its not guaranteed that subsequent accesses to the child item will succeed after this API call.

Parameters
[in,out]parentPointer to a parent object.
[in]strName of the added child object.
[in]itemPointer to child object.