Skip to content

Function: serializeParams() ​

ts
function serializeParams(
   params?: object, 
   strict_validation?: boolean, 
   sortProperties?: boolean, 
   encodeSerialisedValues?: boolean, 
   arrayFormat?: "comma" | "repeat" | undefined
): string;

Serialise a (flat) object into a query string

Parameters ​

ParameterTypeDefault valueDescription
params?object{}the object to serialise
strict_validation?booleanfalsethrow if any properties are undefined
sortProperties?booleantruesort properties alphabetically before building a query string
encodeSerialisedValues?booleantrueURL encode value before serialising
arrayFormat?"comma" | "repeat" | undefined'comma'array representation, defaulting to legacy comma coercion

Returns ​

string

the params object as a serialised string key1=value1&key2=value2&etc

Built by Siebly. Open source SDKs for exchange APIs.