Merge JSON RPC

Merge the JSON RPC enhancement to the upstream