'Handles an incoming request encoded as a JSON string.
Returns a response as a JSON string for commands, and :class:`None` for
notifications.
:param request: the serialized JSON-RPC request
:type request: string
:rtype: string or :class:`None`'

def handle_json(self, request):

    try:
        request = json.loads(request, object_hook=self.decoder)
    except ValueError:
        response = JsonRpcParseError().get_response()
    else:
        response = self.handle_data(request)
    if (response is None):
        return None
    return json.dumps(response, cls=self.encoder)
