If your Arduino can run software configured to speak in the protocol used by Roon extensions, sure. It is not just sending and receiving JSON. You can see how the protocol works by looking at the official implementation or the unofficial Python library.
If you want to just send simple commands from a microcontroller and have them understood by Roon, yes, you need a computer running some extension that will receive those commands and send them to the Roon core. I’d suggest, perhaps, this one: https://github.com/marcelveldt/roon-extension-api-proxy
(Of course, instead of an Arduino or ESP32, you could use a Raspberry Pi Zero and just run the extension on that.)