pook/mock.py
def json(self, json):
        """
        Defines the JSON body to match.

        ``json`` argument can be an JSON string, a JSON serializable
        Python structure, such as a ``dict`` or ``list`` or it can be
        a regular expression used to match the body.

        Arguments:
            json (str|dict|list|regex): body JSON to match.

        Returns:
            self: current Mock instance.
        """
        self._request.json = json
        self.add_matcher(matcher('JSONMatcher', json))
def json(self, json):
        self._request.json = json
        self.add_matcher(matcher('JSONMatcher', json))
def json ( self , json ) : self . _request . json = json self . add_matcher ( matcher ( 'JSONMatcher' , json ) )
Defines the JSON body to match.

        ``json`` argument can be an JSON string, a JSON serializable
        Python structure, such as a ``dict`` or ``list`` or it can be
        a regular expression used to match the body.

        Arguments:
            json (str|dict|list|regex): body JSON to match.

        Returns:
            self: current Mock instance.
Defines the JSON body to match .