BC660 QuecOpen Error formatting a negative number with cJSON

I create a structure with negative numbers

cJSON* t = cJSON_CreateObject();
cJSON* i = cJSON_CreateObject();
cJSON_AddNumberToObject (t, “n1”, -75);
cJSON_AddNumberToObject (t, “n2”, (float)-75);
cJSON_AddNumberToObject (i, “n3”, -75);
cJSON_AddItemToObject (t, “test”, i);

output_1
char *ch = cJSON_PrintUnformatted(t);
APP_DEBUG("%s\r\n", ch);
result_1
{“n1”:-7.5ð0000000000E1,"n2":-7.5ð0000000000E1,“test”:{“n3”:-7.5`ð0000000000E1}}

output_2
cJSON tst = cJSON_Parse(ch);
APP_DEBUG("%f\r\n", cJSON_GetObjectItem(tst, “n1”)->valuedouble);
APP_DEBUG("%f\r\n", cJSON_GetObjectItem(tst, “n2”)->valuedouble);
cJSON
json_node = cJSON_GetObjectItem(tst, “test”);
cJSON* json_item = cJSON_GetObjectItem(json_node, “n3”);
APP_DEBUG("%f\r\n", json_item->valuedouble);
result_2
0.000000
0.000000
0.000000

What is my mistake?

Dear YuS

What is the specific SDK version you use?Did you port the cJson part of the code yourself?

BC660K-GL_QuecOpen_NB5_SDK_V1.0_BETA0628A
cJSON built in SDK.

P.S. I created a library for the latest version of json, but got a project compilation error due to incompatibility with other libraries.

Dear YuS

Please refer to the Quectel_OpenCPU_Quick_Start_Application_Note documentation in the SDK package to learn how to add personal C code to the project.

Hi

I can’t replace just the cJSON library, I have no problems adding my own code.
Can you give me a link to download the latest SDK for BC 660?

Best regard
YuS

Dear YuS

The SDK package needs to connect with the sales representative in your area to apply, which we don’t have either.Thank you.