Can i take these 3 bunches of code below

how can i take

Serial.printf("Publishing on topic %s at QoS 1, packetId: %i ", MQTT_BME280, packetIdPub1);
Serial.printf("Message: %.2f \n", temp);
Serial.printf("Message: %.2f \n", hum);
Serial.printf("Message: %.3f \n", pres);

so i don't know what the %.2f /n means, can i combine these three things into a single line to output {"temp":.,"humi":.,"pre":***.}

cause right not it's sending new lines for each and not putting any usefull data in the database.