Common errors and problems
On this page, you’ll find the explanation and the solution to the common problems that you might get while using ArduinoJson.
Try the ArduinoJson Troubleshooter; it will help you solve your issue quickly.
Beginner gotchas
- Why can’t I use
NULL
? - I found a memory leak in the library!
- Why does the output contain garbage?
- Why is the output incomplete?
deserializeJson()
succeeds by I cannot read any value
Compilation errors
ambiguous overload for 'operator=' (operand types are 'String' and ...)
call of overloaded 'println(...)' is ambiguous
'class Xxx' has no member named 'read'
DynamicJsonBuffer/StaticJsonBuffer is a class from ArduinoJson 5
invalid conversion from 'const char*' to 'char*' [-fpermissive]
invalid initialization of reference of type 'String&' from expression of type '...'
invalid use of incomplete type 'class InvalidConversion<...>'
macro "min" passed 3 arguments, but takes just 2
no matching function for call to 'BasicJsonDocument::BasicJsonDocument()'
no matching function for call to 'canConvertFromJson(...)'
no matching function for call to 'convertFromJson(...)'
(that’s the same page asinvalid initialization of reference of type 'String&' from expression of type '...'
)no matching function for call to 'convertToJson(...)'
no matching function for call to 'makeString(const int&)'
request for member 'write' in ..., which is of non-class type 'char*'
'struct Xxx' has no member named 'read'
Run-time issues
- Why does ArduinoJson return
NotSupported
? - I found a memory leak in the library!
- Why is the input modified?
- Why does the output contain garbage?
- Why is the output incomplete?
- The serialized document contains
null
instead of a string