コード例 #1
0
ファイル: user.py プロジェクト: sarthakdev90/python-twitter
    def AsJsonString(self):
        '''A JSON string representation of this twitter.User instance.

    Returns:
      A JSON string representation of this twitter.User instance
   '''
        return simplejson.dumps(self.AsDict(), sort_keys=True)
コード例 #2
0
ファイル: user.py プロジェクト: nahidnasiri/python-twitter
 def AsJsonString(self):
     """A JSON string representation of this twitter.UserStatus instance.
 
     Returns:
       A JSON string representation of this twitter.UserStatus instance
    """
     return simplejson.dumps(self.AsDict(), sort_keys=True)
コード例 #3
0
ファイル: list.py プロジェクト: 4xx/ll_tweet_bot
  def AsJsonString(self):
    '''A JSON string representation of this twitter.List instance.

    Returns:
      A JSON string representation of this twitter.List instance
   '''
    return simplejson.dumps(self.AsDict(), sort_keys=True)
コード例 #4
0
ファイル: status.py プロジェクト: nahidnasiri/python-twitter
    def AsJsonString(self, allow_non_ascii=False):
        """A JSON string representation of this twitter.Status instance.

        To output non-ascii, set keyword allow_non_ascii=True.

        Returns:
          A JSON string representation of this twitter.Status instance
       """
        return simplejson.dumps(self.AsDict(), sort_keys=True,
                                ensure_ascii=not allow_non_ascii)
コード例 #5
0
    def AsJsonString(self, allow_non_ascii=False):
        '''A JSON string representation of this twitter.Status instance.
    
    To output non-ascii, set keyword allow_non_ascii=True.

    Returns:
      A JSON string representation of this twitter.Status instance
   '''
        return simplejson.dumps(self.AsDict(),
                                sort_keys=True,
                                ensure_ascii=not allow_non_ascii)