Skip to main content
added 5 characters in body
Source Link
ocrdu
  • 1.8k
  • 3
  • 12
  • 24

It could be that your JSON object capacity is too small because of string duplication when you deserialise it to print it.

You should try a capacity like JSON_OBJECT_SIZE(3) + 500 for deserialising, and see what happens.

Also, try: doc["rfid"] = str_rfid.c_str(); to see if that works better (CString instead of String object).

More information on object capacity can be found here; there's a calculator here.

It could be your JSON object capacity is too small because of string duplication when you deserialise it to print it.

You should try a capacity like JSON_OBJECT_SIZE(3) + 500 for deserialising, and see what happens.

Also, try: doc["rfid"] = str_rfid.c_str(); to see if that works better (CString instead of String object).

More information on object capacity can be found here; there's a calculator here.

It could be that your JSON object capacity is too small because of string duplication when you deserialise it to print it.

You should try a capacity like JSON_OBJECT_SIZE(3) + 500 for deserialising, and see what happens.

Also, try: doc["rfid"] = str_rfid.c_str(); to see if that works better (CString instead of String object).

More information on object capacity can be found here; there's a calculator here.

Source Link
ocrdu
  • 1.8k
  • 3
  • 12
  • 24

It could be your JSON object capacity is too small because of string duplication when you deserialise it to print it.

You should try a capacity like JSON_OBJECT_SIZE(3) + 500 for deserialising, and see what happens.

Also, try: doc["rfid"] = str_rfid.c_str(); to see if that works better (CString instead of String object).

More information on object capacity can be found here; there's a calculator here.