Browse Source

doc: add info about serializable types

querystring.stringify() doesn't serialize some values.
Explicitly mention what values are serialized in the docs.
Add what happens when another data type is passed to
`querystring.stringify()` besides the ones that can be correctly parsed

PR-URL: https://github.com/nodejs/node/pull/12313
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
v6.x
Shubheksha Jalan 8 years ago
committed by Myles Borins
parent
commit
929ca307d2
No known key found for this signature in database GPG Key ID: 933B01F40B5CA946
  1. 4
      doc/api/querystring.md

4
doc/api/querystring.md

@ -91,6 +91,10 @@ added: v0.1.25
The `querystring.stringify()` method produces a URL query string from a
given `obj` by iterating through the object's "own properties".
It serializes the following types of values passed in `obj`:
{string|number|boolean|string[]|number[]|boolean[]}
Any other input values will be coerced to empty strings.
For example:
```js

Loading…
Cancel
Save