初始提交卡包 USB 工程
纳入固件源码、屏幕组件、nand_xfer 工具和文档。忽略本机构建产物、sdkconfig,以及含本机路径的依赖锁。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
#include "cJSON.h"
|
||||
#include "json.h"
|
||||
|
||||
// KEY_VALUE_PAIR data_pair =
|
||||
// {
|
||||
// .key = "action",
|
||||
// .value = NULL,
|
||||
// .son1_pair =
|
||||
// }
|
||||
|
||||
void json_create(const char *str)
|
||||
{
|
||||
|
||||
cJSON *report_msg = cJSON_CreateObject();
|
||||
cJSON_AddStringToObject(report_msg, "action", "message");
|
||||
cJSON_AddStringToObject(report_msg, "target_id", "0");
|
||||
cJSON *data = cJSON_CreateObject();
|
||||
cJSON_AddStringToObject(data, "status", "download_finish_ok");
|
||||
cJSON_AddItemToObject(report_msg, "data", data);
|
||||
char *report_str = cJSON_PrintUnformatted(report_msg);
|
||||
|
||||
}
|
||||
|
||||
|
||||
cJSON* json_create_any_type(int type,cJSON *root, const char *key, const char *value)
|
||||
{
|
||||
cJSON *root = cJSON_CreateObject();
|
||||
switch(type)
|
||||
{
|
||||
case 1://string
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user