**Description**

        Update the device shadow JSON document string from AWS IoT by publishing the provided JSON 
        document to the corresponding shadow topics. Shadow response topics will be subscribed to 
        receive responses from AWS IoT regarding the result of the get operation. Response will be 
        available in the registered callback. If no response is received within the provided timeout, 
        a timeout notification will be passed into the registered callback.

        **Syntax**

        .. code:: python

          # Update the shadow JSON document from AWS IoT, with a timeout set to 5 seconds
          BotShadow.shadowUpdate(newShadowJSONDocumentString, customCallback, 5)

        **Parameters**

        *srcJSONPayload* - JSON document string used to update shadow JSON document in AWS IoT.

        *srcCallback* - Function to be called when the response for this shadow request comes back. Should 
        be in form :code:`customCallback(payload, responseStatus, token)`, where :code:`payload` is the 
        JSON document returned, :code:`responseStatus` indicates whether the request has been accepted, 
        rejected or is a delta message, :code:`token` is the token used for tracing in this request.

        *srcTimeout* - Timeout to determine whether the request is invalid. When a request gets timeout, 
        a timeout notification will be generated and put into the registered callback to notify users.

        **Returns**

        The token used for tracing in this shadow request.

def shadowUpdate(self, srcJSONPayload, srcCallback, srcTimeout):
        """
        **Description**

        Update the device shadow JSON document string from AWS IoT by publishing the provided JSON 
        document to the corresponding shadow topics. Shadow response topics will be subscribed to 
        receive responses from AWS IoT regarding the result of the get operation. Response will be 
        available in the registered callback. If no response is received within the provided timeout, 
        a timeout notification will be passed into the registered callback.

        **Syntax**

        .. code:: python

          # Update the shadow JSON document from AWS IoT, with a timeout set to 5 seconds
          BotShadow.shadowUpdate(newShadowJSONDocumentString, customCallback, 5)

        **Parameters**

        *srcJSONPayload* - JSON document string used to update shadow JSON document in AWS IoT.

        *srcCallback* - Function to be called when the response for this shadow request comes back. Should 
        be in form :code:`customCallback(payload, responseStatus, token)`, where :code:`payload` is the 
        JSON document returned, :code:`responseStatus` indicates whether the request has been accepted, 
        rejected or is a delta message, :code:`token` is the token used for tracing in this request.

        *srcTimeout* - Timeout to determine whether the request is invalid. When a request gets timeout, 
        a timeout notification will be generated and put into the registered callback to notify users.

        **Returns**

        The token used for tracing in this shadow request.

        """
        # Validate JSON
        self._basicJSONParserHandler.setString(srcJSONPayload)
        if self._basicJSONParserHandler.validateJSON():
            with self._dataStructureLock:
                # clientToken
                currentToken = self._tokenHandler.getNextToken()
                self._tokenPool[currentToken] = Timer(srcTimeout, self._timerHandler, ["update", currentToken])
                self._basicJSONParserHandler.setAttributeValue("clientToken", currentToken)
                JSONPayloadWithToken = self._basicJSONParserHandler.regenerateString()
                # Update callback data structure
                self._shadowSubscribeCallbackTable["update"] = srcCallback
                # Update number of pending feedback
                self._shadowSubscribeStatusTable["update"] += 1
            # Two subscriptions
            if not self._isPersistentSubscribe or not self._isUpdateSubscribed:
                self._shadowManagerHandler.basicShadowSubscribe(self._shadowName, "update", self.generalCallback)
                self._isUpdateSubscribed = True
                self._logger.info("Subscribed to update accepted/rejected topics for deviceShadow: " + self._shadowName)
            # One publish
            self._shadowManagerHandler.basicShadowPublish(self._shadowName, "update", JSONPayloadWithToken)
            # Start the timer
            self._tokenPool[currentToken].start()
        else:
            raise ValueError("Invalid JSON file.")
        return currentToken