ljharb/qs

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

Open

#197 ouverte le 9 févr. 2017

Voir sur GitHub
 (7 commentaires) (0 réactions) (1 assigné)JavaScript (744 forks)batch import
bughelp wantedparse

Métriques du dépôt

Stars
 (8 015 stars)
Métriques de merge PR
 (Merge moyen 6j 22h) (2 PRs mergées en 30 j)

Description

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

Guide contributeur