code: def parse(self, body):
          
          if isinstance(body, six.string_types):
              body = json.loads(body)
  
          # version
          version = body['version']
          self.version = version
  
          # session
          session = body['session']
          self.session.new = session['new']
          self.session.session_id = session['sessionId']
          application_id = session['application']['applicationId']
          self.session.application.application_id = application_id
          if 'attributes' in session and session['attributes']:
              self.session.attributes = session.get('attributes', {})
          else:
              self.session.attributes = {}
          self.session.user.user_id = session['user']['userId']
          self.session.user.access_token = session['user'].get('accessToken', 0)
  
          # request
          request = body['request']
  
          # launch request
          if request['type'] == 'LaunchRequest':
              self.request = LaunchRequest()
  
          # intent request
          elif request['type'] == 'IntentRequest':
              self.request = IntentRequest()
              self.request.intent = Intent()
              intent = request['intent']
              self.request.intent.name = intent['name']
              if 'slots' in intent and intent['slots']:
                  for name, slot in six.iteritems(intent['slots']):
                      self.request.intent.slots[name] = Slot()
                      self.request.intent.slots[name].name = slot['name']
                      self.request.intent.slots[name].value = slot.get('value')
  
          # session ended request
          elif request['type'] == 'SessionEndedRequest':
              self.request = SessionEndedRequest()
              self.request.reason = request['reason']
  
          # common - keep after specific requests to prevent param overwrite
          self.request.type = request['type']
          self.request.request_id = request['requestId']
          self.request.timestamp = request['timestamp']
  
          return self
docs: Parse JSON request, storing content in object attributes.
  
          Args:
              body: str. HTTP request body.
  
          Returns:
              self