Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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

@ah1508

Description

@ah1508

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions