Implement JSON reviver for serialization of RPC messages