How to Create and Send JSON in Quectel M66(Version - M66FAR01A08BT)

Hello, I am new to Quectel controllers and I am using M66 to create a project where I need to send data at regular intervals to a server via http post request.
I want to know that how JSON object can be created and sent to the server?
Currently, I tried to make it using character array as Follows:

Ql_sprintf(Data_JSON,"[{“RPC”:“0.1A”,“YPC”:“0.2A”,“BPC”:“0.3A”,“RPV”:“110”,“YPV”:“111”,“BPV”:“112”,“IBV”:“3.5”,“TS”:“03-07-21 9:15:50”,“TSS”:“0”,“DID”:“ElectricalIOT111”}]\0");
Note: I have used \ escape character in the program but it is not shown here.

But the issue is that, the server is not accepting it as a JSON object.
I tried to send the string format using Postman on the server, it accepts as a json object. But when I send it from Quectel M66 via OPENCPU SDK program , the server does not recognize it as a JSON object.

How to do this part? Is there any library or support available?

Hi Parth,

Please send command AT+QHTTPCFG=“content-Type”,“application/json” in initialization and try again .
you will be able send data in Json format .


I face same Problem.

Ratanji i try this solution but not work.