Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

buildQueryString should not force to use brackets around nested properties #38

Open
ah1508 opened this issue Nov 25, 2019 · 0 comments
Open

Comments

@ah1508
Copy link

ah1508 commented Nov 25, 2019

I'm submitting a feature request

  • Library Version:
    aurelia-path 1.1.5

Please tell us about your environment:

  • Operating System:
    Ubuntu

  • Node Version:
    13.0.1

  • NPM Version:
    6.12.0

  • JSPM OR Webpack AND Version
    webpack 4.41.2

  • Browser:
    all

  • Language:
    all

Current behavior:

buildQueryString with complex object returns a query string where nested properties (example : author.lastname) are surrounded by square brackets. Exemple : author[lastname].

Expected/desired behavior:

For JS server I guess it is equal, since author.lastname and author["lastname"] are the same, but in Java (and probably in .NET), brackets are only use if the property is indexed (a Map or a List if a number is between the brackets).

  • What is the expected behavior?

it would be nice to add a parameter to the buildQueryString method, so the caller can choose a strategy (dot, brackets). dot could even be the default strategy if it makes no difference for JS web servers.

  • What is the motivation / use case for changing the behavior?

better compatibility with non JS web servers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant