append object to payload
483245
def <<(obj)
      if obj.is_a?(Integer)
        push_int(obj)
      elsif obj.is_a?(String)
        append_data(obj)
      elsif obj.is_a?(Array)
        obj.each { |o| self.<< o}
        self
      end
    end
1313591
def send(self, payload, *args, **kwargs):
        
        if isinstance(payload, (list, dict)):
            payload = json.dumps(payload)

        self.sendMessage(payload.encode(), *args, **kwargs)
1332097
def addobject(bunchdt, data, commdct, key, theidf, aname=None, **kwargs):
    """"""
    obj = newrawobject(data, commdct, key)
    abunch = obj2bunch(data, commdct, obj)
    if aname:
        namebunch(abunch, aname)
    data.dt[key].append(obj)
    bunchdt[key].append(abunch)
    for key, value in list(kwargs.items()):
        abunch[key] = value
    return abunch
520704
function addData(a)
        {
            if(isObject(a.event.value) || isArray(a.event.value))
            {
                if(!isObservable(a.event.value))
                {
                    a.preventDefault();
                    var local = a.event.local,
                        str = local.__kbscopeString+(local.__kbscopeString.length !== 0 ? '.' : '')+a.key,
                        builder = (isObject(a.event.value) ? KObject : KArray)(local.__kbname,local,str);
                    
                    overwrite(builder).parseData(a.event.value);
                    if(local[a.key] === undefined)
                    {
                      local.add(a.key,builder);
                    }
                    else if(isArray(local))
                    {
                      local.splice(a.key,0,builder);
                    }
                    else if(isObject(local))
                    {
                      local.set(a.key,builder);
                    }
                }
            }
        }
265838
def generate_payload(exclude=None, **kwargs):
    
    if exclude is None:
        exclude = []
    return {key: value for key, value in kwargs.items() if
            key not in exclude + DEFAULT_FILTER
            and value is not None
            and not key.startswith('_')}
464052
function serialize(obj) {
  if (!isObject(obj)) return obj;
  var pairs = [];
  for (var key in obj) {
    if (null != obj[key]) {
      pushEncodedKeyValuePair(pairs, key, obj[key]);
        }
      }
  return pairs.join('&');
}
1151096
def push(self, obj):
        """"""
        rv = getattr(self._local, "stack", None)
        if rv is None:
            self._local.stack = rv = []
        rv.append(obj)
        return rv
563388
def append(self, item):
        """"""
        if not isinstance(item, str):
            raise TypeError(
                'Members of this object must be strings. '
                'You supplied \"%s\"' % type(item))
        list.append(self, item)
194736
def build_payload(self, payload):
        """"""
        remaining_size = self.MAX_SEGMENT_PAYLOAD_SIZE

        for part in self.parts:
            part_payload = part.pack(remaining_size)
            payload.write(part_payload)
            remaining_size -= len(part_payload)
165152
def append(data)
      unless data.kind_of? Array
        raise ArgumentError, 'Xcellus.append only accepts Arrays'
      end
      Xcellus::_append(@handle, data.to_json)
    end
398503
function postback(payload, callback)
{
  if (typeof payload.payload == 'string')
  {
    payload.payload = JSON.parse(payload.payload);
  }

  callback(null, payload);
}
475731
function getAppend(path, obj, target, propName){
  var propValue = utils.getNodeVaue(path, obj);
  if(propValue)
    target[propName] = propValue;
}
705565
private void add(JSONObject pResp, Payload pKey, Object pValue) {
        if (pValue != null) {
            pResp.put(pKey.toString().toLowerCase(),pValue);
        }
    }
1321634
public void addPayload(final Payload payload) {
		ApptentiveLog.v(PAYLOADS, "Adding payload: %s", payload);
		singleThreadExecutor.execute(new Runnable() {
			@Override
			public void run() {
				try {
					dbHelper.addPayload(payload);
					sendNextPayloadSync();
				} catch (Exception e) {
					ApptentiveLog.e(PAYLOADS, e, "Exception while adding a payload: %s", payload);
					logException(e);
				}
			}
		});
	}
1330053
public Payload add(String key, String value) {
    getData().put(key, value);
    return this;
  }
944875
def append_json(
            self,
            obj: Any,
            headers: Optional['MultiMapping[str]']=None
    ) -> Payload:
        """"""
        if headers is None:
            headers = CIMultiDict()

        return self.append_payload(JsonPayload(obj, headers=headers))
232936
def _create_payload(payload):
        
        blocks, remainder = divmod(len(payload), BLOCKSIZE)
        if remainder > 0:
            payload += (BLOCKSIZE - remainder) * NUL
        return payload