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

Added Custom Delimiter Support #36

Closed
wants to merge 1 commit into from
Closed

Added Custom Delimiter Support #36

wants to merge 1 commit into from

Conversation

mal
Copy link

@mal mal commented Mar 7, 2012

Implements GH-1 - this time taking style tips from the coerce branch.

This will allow one additional single character delimiter to be used in conjunction with the existing syntax, allowing support for querystrings such as:

foo.bar[0].boing[he.llo].world.rawr=rawk.txt

To be parsed correctly with the . delimiter as:

{ foo: { bar: [ { boing: { 'he.llo': { world: { rawr: 'rawk.txt' } } } } ] } }

Found this behavior mentioned on restify/node-restify#94 which lead me to GH-1, figured I'd give it a whirl; feedback welcome.

@tj
Copy link
Owner

tj commented Mar 7, 2012

personally I dont see the point, everyone else on the planet uses foo[bar]=baz and it's really not that bad, people already know what it is and how it's parsed

@mal
Copy link
Author

mal commented Mar 7, 2012

I agree that [] isn't that bad, but that's not the same as no room for improvement. After all it was in the issues list, so at some point its inclusion must have made sense.

@tj
Copy link
Owner

tj commented Mar 7, 2012

the main reason was because the original node one supported it before they took out nesting support, aside from disliking some of the characters there's no real reason to support it IMO

@mal
Copy link
Author

mal commented Mar 7, 2012

I see, well it's not on by default, so it shouldn't go breaking any existing use cases. Maybe given the option people will prefer and migrate back to the dot notation (personally I think it suits node better), or maybe it won't get used at all. I'll leave its inclusion to your best guess at what the people want :)

@tj
Copy link
Owner

tj commented Mar 7, 2012

for better or for worse the only thing I've actually seen used in practice (other than paypal haha) is the [] notation. Not saying that's my favorite or anything but it's definitely what people have adopted

@mal
Copy link
Author

mal commented Dec 21, 2012

No interest in this feature for now, so closing the PR to get to PR-0 for new year ;D

@mal mal closed this Dec 21, 2012
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

Successfully merging this pull request may close these issues.

2 participants