question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Hi there,

I’m using express + body-parser in my app and I ran into some very odd issue with deeper keys in a nested object coming out with brackets surrounding the keys, took me a while to figure out what was causing it.

Apparently qs accepts a depth option in order to go deeper… is there any support planned for this, or should I write my own qs parser in that case?

Cheers

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Comments:21 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
dougwilsoncommented, Sep 18, 2016

Hi @AndersonZacharyT , I don’t think that file has anything to do with the body-parser module. If you are talking about the query string in Express, then you can do the following:

app.set('query parser', function (str) {
  return qs.parse(str, {
    allowPrototypes: true,
    limit: 10
  });
})
1reaction
AndersonZacharyTcommented, Aug 31, 2016

@dougwilson Hey Doug–thanks for all of your work! I am facing this issue, using Express/LoopBack, and even though my Express is > 1.11 I seem to have hit this wall… anything coming to mind?

More info: My code is hitting this within Express/lib/utils:

function parseExtendedQueryString(str) {
  return qs.parse(str, {
    allowPrototypes: true
  });
}

and as you can see the options for qs are hard-coded, but adding a limit:10 solves all of our problems…

Read more comments on GitHub >

github_iconTop Results From Across the Web

qs - npm
A querystring parser that supports nesting and arrays, with a depth limit. Latest version: 6.11.0, last published: 6 months ago.
Read more >
Expose `qs`' `depth` configuration option for the Manager
I would like Storybook to expose a configuration value that allows a user of this library to set qs ' depth option to...
Read more >
qs@0.6.6 - Snyk Vulnerability Database
qs is a querystring parser that supports nesting and arrays, with a depth limit. Affected versions of this package are vulnerable to Prototype...
Read more >
Qp and Qs tomography depth slices. (a–d) are Qp results ...
Download scientific diagram | Qp and Qs tomography depth slices. (a–d) are Qp results at the labeled depths. (e–h) are Qs results at...
Read more >
Structural Concepts Oasis B32-QS 34 1/2" Narrow Depth ...
Structural Concepts Oasis B32-QS 34 1/2" Narrow Depth Air Curtain Merchandiser Refrigerator - 14.48 Cu. Ft., 120V ; MFR #: B32-QS ; UPC...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found