Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
nlf committed Sep 11, 2015
1 parent 9e9759e commit f28f5c2
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ Qs.parse('a[][b]=c');
Qs.stringify(object, [options]);
```

When stringifying, **qs** always URI encodes output. Objects are stringified as you would expect:
When stringifying, **qs** by default URI encodes output. Objects are stringified as you would expect:

```javascript
Qs.stringify({ a: 'b' });
Expand All @@ -210,6 +210,13 @@ Qs.stringify({ a: { b: 'c' } });
// 'a%5Bb%5D=c'
```

This encoding can be disabled by setting the `encode` option to `false`:

```javascript
Qs.stringify({ a: { b: 'c' } }, { encode: false });
// 'a[b]=c'
```

Examples beyond this point will be shown as though the output is not URI encoded for clarity. Please note that the return values in these cases *will* be URI encoded during real usage.

When arrays are stringified, by default they are given explicit indices:
Expand Down

0 comments on commit f28f5c2

Please sign in to comment.