could not deserialize json more than 128 bytes using esp8266 mqtt

Hello,

From my days I had a problem using JSON with MQTT, the issue was I could not able to send more data using MQTT protocol. I was using PubSubClient.h for MQTT and ArduinoJson.h for JSON, there was no problem until I send 128bytes (including message, header) of data over MQTT. If the buffer size was more than 128bytes it was not considering it, I even used Arduino_Json.h library by Arduino, but the problem was not in ArduinoJson.h library it was in PubSubClient.h library. It has MQTT_MAX_PACKET_SIZE 128. Only after changing it to 500 my problem was solved.

note: You can only change it in the library file named PubSubClient.h
C:\Users\PC\Documents\Arduino\libraries\PubSubClient

#ifndef MQTT_MAX_PACKET_SIZE
#define MQTT_MAX_PACKET_SIZE 128
#endif

to

#ifndef MQTT_MAX_PACKET_SIZE
#define MQTT_MAX_PACKET_SIZE 500
#endif

you can also increase the size

Thank you