On the yun in preinstalled spacebrew, that uses websocket with python. Check this out https://github.com/julioterra/yunSpacebrew
If I get it right from the Spacebrew docu, it uses the serial port to communicate with the python scripts on the Linino site and transfers the data to their cloud hub.
There is a forum post which collects some ideas to communicate with a Sketch running on the ATMega from python code running on the linux machine.The idead would be to send your JSON data from the sketch to the python code over Serial1. Then the python code forwards the data to your Websocket-Client.
Doesn't this sound like what Spacebrew does?
You can do that using the serial communication to pass info between the two environments. In the forum there is a thread talking about...
Please enter a valid email to subscribe
We need to confirm your email address.
To complete the subscription, please click the link in the
email we just sent you.
Thank you for subscribing!
via Egeo 16