Based on your abiliby to compile RESTRemote.ino I've started with a fresh install of arduino-ide (2.2.1)
Added https://arduino.esp8266.com/stable/package_esp8266com_index.json to 'Additional boards manager URLs:' under File - Preferences.
Installed esp8266 3.1.2 using the 'Boards Manager'
Selected the 'Generic ESP8266 Module' for the board type
Added ArduinoJson 5.13.1, IRremoteESP8266 2.8.6 & WifiManager 2.016-rc.2 using the library manager.
Used File - Open to open the RESTRemote.ino file under the ~/RESTRemote-master/esp8266/RESTRemote directory.
Use Sketch - Verify/Compile to compile the sketch with the 'ArduinoJson_5_compile_errors' result.
If I upgrade ArduinoJson to 6.21.3 and attempt a compile I get the 'ArduinoJson_6_compile_errors' result.
I've detailed the steps that I used and attached the compile output as I suspect it is something that I'm doing incorrect and I was hoping it would be obvious to someone else. I don't know if it is relevant but I'm also using Ubuntu.
BTW, thanks for testing the compile on your end so quickly. This is more of a cool to have project for me and an interesting way to learn arduino-ide than something critical. Also, since the problem that I'm having is more related to the arduino side of things is there a more appropriate place for me to ask for help (Github, etc)?
ArduinoJson_6_compile_errors
ArduinoJson_5_compile_errors