code: def _marshal_json(self, extras=()):
          
          policies = self.policies[:]
          policies.extend(extras)
          if self._content_length_range:
              policies.append(['content-length-range'] +
                              list(self._content_length_range))
  
          policy_stmt = {
              "expiration": self._expiration.strftime(
                  "%Y-%m-%dT%H:%M:%S.000Z"),
          }
  
          if len(policies) > 0:
              policy_stmt["conditions"] = policies
  
          return json.dumps(policy_stmt)
docs: Marshal various policies into json str/bytes.