ljharb/qs

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

Aperta

#197 aperta il 9 feb 2017

 (7 commenti) (0 reazioni) (1 assegnatario)JavaScript (911 fork)batch import
bughelp wantedparse

Metriche repository

Star
 (8943 stelle)
Metriche merge PR
 (Metriche PR in attesa)

Descrizione

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 ] }

Guida contributor