I posted this in another thread, but it seems relevant to what you are looking for: https://stopa.io/post/265
It walks through the process of building a Lisp in JSON and the associated parser in JavaScript. It could be a good starting point to build out a cross-platform approach to sending logic over the wire.