I've met with the strange thing. I created some sketch with ArduinoJSON v.6.
I created a function
void printResult(JsonObject res)
and after compilation I got the error:
[hr]Arduino: 1.8.8 (Windows 10), Board: "WeMos D1 R1, 160 MHz, Flash, Enabled, 4M (1M SPIFFS), v2 Lower Memory, Disabled, None, Only Sketch, 921600"
ModbusConfig:180:18: error: variable or field 'printResult' declared void
ModbusConfig:180:18: error: 'JsonObject' was not declared in this scope[hr]
but if I Invoke JsonObject in any function it works without any problem. E.g.:
compiled successfully. I don't understand what's a problem.