code: def to_json_str(self):
      
      _json = self.to_json()
      try:
        return json.dumps(_json, sort_keys=True, cls=JsonEncoder)
      except:
        logging.exception("Could not serialize JSON: %r", _json)
        raise
docs: Convert data to json string representation.
  
      Returns:
        json representation as string.