code: def _DecodeUnrecognizedFields(message, pair_type):
      
      new_values = []
      codec = _ProtoJsonApiTools.Get()
      for unknown_field in message.all_unrecognized_fields():
          # TODO(craigcitro): Consider validating the variant if
          # the assignment below doesn't take care of it. It may
          # also be necessary to check it in the case that the
          # type has multiple encodings.
          value, _ = message.get_unrecognized_field_info(unknown_field)
          value_type = pair_type.field_by_name('value')
          if isinstance(value_type, messages.MessageField):
              decoded_value = DictToMessage(value, pair_type.value.message_type)
          else:
              decoded_value = codec.decode_field(
                  pair_type.value, value)
          try:
              new_pair_key = str(unknown_field)
          except UnicodeEncodeError:
              new_pair_key = protojson.ProtoJson().decode_field(
                  pair_type.key, unknown_field)
          new_pair = pair_type(key=new_pair_key, value=decoded_value)
          new_values.append(new_pair)
      return new_values
docs: Process unrecognized fields in message.