code: def _validate_format(req):
          '''
          Validate jsonrpc compliance of a jsonrpc-dict.
  
          req - the request as a jsonrpc-dict
  
          raises SLOJSONRPCError on validation error
          '''
          #check for all required keys
          for key in SLOJSONRPC._min_keys:
              if not key in req:
                  logging.debug('JSONRPC: Fmt Error: Need key "%s"' % key)
                  raise SLOJSONRPCError(-32600)
  
          #check all keys if allowed
          for key in req.keys():
              if not key in SLOJSONRPC._allowed_keys:
                  logging.debug('JSONRPC: Fmt Error: Not allowed key "%s"' % key)
                  raise SLOJSONRPCError(-32600)
  
          #needs to be jsonrpc 2.0
          if req['jsonrpc'] != '2.0':
              logging.debug('JSONRPC: Fmt Error: "jsonrpc" needs to be "2.0"')
              raise SLOJSONRPCError(-32600f _validate_format(req):
          '''
          Validate jsonrpc compliance of a jsonrpc-dict.
  
          req - the request as a jsonrpc-dict
  
          raises SLOJSONRPCError on validation error
          '''
          #check for all required keys
          for key in SLOJSONRPC._min_keys:
              if not key in req:
                  logging.debug('JSONRPC: Fmt Error: Need key "%s"' % key)
                  raise SLOJSONRPCError(-32600)
  
          #check all keys if allowed
          for key in req.keys():
              if not key in SLOJSONRPC._allowed_keys:
                  logging.debug('JSONRPC: Fmt Error: Not allowed key "%s"' % key)
                  raise SLOJSONRPCError(-32600)
  
          #needs to be jsonrpc 2.0
          if req['jsonrpc'] != '2.0':
              logging.debug('JSONRPC: Fmt Error: "jsonrpc" needs to be "2.0"')
              raise SLOJSONRPCError(-32600)
docs: Validate jsonrpc compliance of a jsonrpc-dict.
  
          req - the request as a jsonrpc-dict
  
          raises SLOJSONRPCError on validation error