JSON-RPC in C (server only for now)