[SOLVED] Cannot publish payload with "timestamp" using PubSubClient librari on esp32

Hello. I just what to send data with esp32 development board with PubSubClient over mqtt. But when i add time stamp on payload. it doesn not send to ubidots. How to solve this. Thanks

this is my success payload

  sprintf(payload, "%s", "");
  sprintf(payload, "{\"%s\":", VARIABLE_LABEL);
  sprintf(payload, "%s {\"value\": %s", payload, "1"); 
  sprintf(payload, "%s {\"timestamp\": %s", payload, "1576564420000");
  sprintf(payload, "%s } }", payload);
  client.publish(topic, payload);
  client.loop();

and this is my unsuccess payload format

 sprintf(payload, "%s", ""); 
  sprintf(payload, "{\"%s\":", VARIABLE_LABEL); 
  sprintf(payload, "%s {\"value\": %s", payload, "1"); 
  sprintf(payload, "%s {\"timestamp\": %s", payload, "1576564420000"); 
  sprintf(payload, "%s, \"context\":{\"lat\": %s, \"lng\": %s}", payload, "12", "13"); 
  sprintf(payload, "%s } }", payload); // Closes the dictionary brackets
  client.publish(topic, payload);
  client.loop();

Greetings, may you please print in your serial port the JSON payload that you are building in the second piece of code and share it to give you further debug hints?

I will be attentive

i’m sorry its my fault. i just change my code into this .

  sprintf(payload, "%s", ""); 
  sprintf(payload, "{\"%s\":", VARIABLE_LABEL); 
  sprintf(payload, "%s {\"value\": %s", payload, "1"); 
  sprintf(payload, "%s, \"timestamp\": %s", payload, "1576564420000"); 
  sprintf(payload, "%s, \"context\":{\"lat\": %s, \"lng\": %s}", payload, "12", "13"); 
  sprintf(payload, "%s } }", payload); // Closes the dictionary brackets
  client.publish(topic, payload);
  client.loop();

and now its successfully send to Ubidots. Thanks Guys