publish json data to mqtt
What's your last error message?

no matching function for call to 'PubSubClient::publish(const char [11], String&amp;)'


Read the documentation for the publish() method in PubSubClient:


  int publish (topic, payload)
  
  Publishes a string message to the specified topic.
  
  Parameters
  
  topic - the topic to publish to (const char[]) 
  
  payload - the message to publish (const char[])


Look at the parameters you're using. You're passing a String as payload. publish() expects payload to be a char[] (essentially the same thing as a char*) - a C language string. This is the error you're seeing.

Read the documentation for String. How do you get a char* from a String? The c_str() method.

You need to change

client.publish("esp32/data", jsonString);


to

client.publish("esp32/data", jsonString.c_str());


As for your other warnings, it looks like your Arduino libraries are a mess with multiple conflicting libraries installed; if you want to get rid of the warnings, clean up your libraries.