JSON RPC 2.0

I have changed imports for things to compile. I'll revert after you are satisfied with the code.