代码只供参考。
json_object *host_name = json_object_object_get(request, "hostName");
json_object *blocked = json_object_object_get(request, "blocked");
json_object *my_array = json_object_new_array();
json_object *key_obj = json_object_new_object();
json_object *new_device = json_object_new_object(); char *device_blocked = (char *)json_object_get_string(blocked);
char *device_host_name = (