Using JSON format to send data on mqtt client

Sticking with one example would prevent additional confusion :wink:

As to your original request, this is how you'd do it

  JsonWriterStatic<256> jw;
  JsonWriterAutoObject obj(&jw);

  jw.insertKeyObject("data");                 // create the key/value(object)
  jw.insertKeyValue("Sentence", "hello");     // add the key/value(string) to that open object
  jw.finishObjectOrArray();                   // close the object

BTW

You shouldn't have a colon in your key there. While it's not forbidden, it's not best style either :wink:
The JSON string would look like this

{ "data:": {             // <-- 🤮
    "Sentence":"hello" 
  }
}