JSON-RPC for AngularJS