_write_string_value_to_json(value_object, value);
break;
case 24:
- printf("Konfiguration reset\n");
resp = kds_s2000w_client_response_init();
kds_s2000w_client_get_capabilities(resp);
- printf("response data: %s\n", resp->data);
-
json_object* capabilities = json_tokener_parse(resp->data);
json_object* default_values = json_object_object_get(capabilities, "Defaults");
- const char* json_string = json_object_to_json_string_ext(default_values, JSON_C_TO_STRING_PLAIN);
- printf("default_values: %s\n", json_string);
+ json_object* default_config = json_object_new_object();
+ json_object_object_add(default_config, "Configuration", default_values);
+ const char* json_string = json_object_to_json_string_ext(default_config, JSON_C_TO_STRING_PLAIN);
kds_s2000w_client_response_free(resp);
-
resp = kds_s2000w_client_response_init();
resp->size = sizeof(char) * strlen(json_string);
resp->code = 0;