So I’m trying to used SparkJson but I get this compile error
warning: deleting object of polymorphic class type 'ArduinoJson::DynamicJsonBuffer' which has non-virtual destructor might cause undefined behaviour [-Wdelete-non-virtual-dtor] ~DynamicJsonBuffer() { delete _next; }
Does anyone have idea how to fix this error? I’m not using the DynamicJsonBuffer, I’m guessing it’s something new with the compiler, because noting has changed in this lib since 2015. I’m using Particle workbench btw.
How are you using the functions?
IIRC, DynamicJsonBuffer is not meant to be used as global but wants to be used inside a function.
BTW, warnings won’t stop you from building your code and a “suspected” issue may not be one after all.
However, I’d suggest using JsonParserGeneratorRK instead anyway - that library will be properly maintained by @rickkas7 while SparkJson is quite dated (as the name suggests).
Alternatively you can use ArduinoJson which is also well maintained.