ljharb/qs

Object with array containing object and scalars is not parsed correctly.

Offen

#197 geöffnet am 09.02.2017

 (7 Kommentare) (0 Reaktionen) (1 zugewiesene Person)JavaScript (902 Forks)batch import
bughelp wantedparse

Repository-Metriken

Stars
 (8.943 Sterne)
PR-Merge-Metriken
 (Durchschn. Merge 6T 22h) (2 gemergte PRs in 30 T)

Beschreibung

Client request from any browser $.get('/ajax', {arr: [{foo: 123, bar: 'foo'},2,3] }, ...

On server (node .10, 4.x and 7.x) with latest qs

is parsed as

{ arr: { __0: [{ foo: 123, bar: 'foo', 2: true}, 3] } }

it should be

{ arr: [ {foo: 123, bar: 'foo'}, 2, 3 ] }

Contributor Guide