From: Niitsuma Hirotaka on
I write little script run python via netcat

http://www2s.biglobe.ne.jp/~niitsuma/jsonrpcdirect.html

Usage

$ netcat localhost 31415
{"method": "numpy.linalg.norm", "params": [[2,2]], "id": 0}

then get response

{"result": 2.8284271247461903, "error": null, "id": 0}