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

Proxy resolver now supports array values i.e "value.nested_value[num].ne... #73

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

DraganMileski
Copy link
Contributor

I changed the parser so that now is more intuitive to use. For example is you have:

{
"foo" : [
{
"bar" : [
{
"foobar" : 0
"fooDescription" : "Bar"
}
]

},
{
  ...

in order to access ("foobar" : 0) your value path will be "foo[0].bar[0].foobar"

@fdietz
Copy link
Owner

fdietz commented Apr 6, 2013

Hi Dragan,

I suggest a somewhat easier approach to handle the "key[234]" brackets parsing. Why not using a regular expression instead?

For example:
\A(.)[(\d)]\Z

For a string "key[234]" this will give you "key" as the first match and "234" as the second match.

Additionally, can you please also provide a unit test?

Thanks and kind regards,
Frederik

@fdietz
Copy link
Owner

fdietz commented May 20, 2013

Hi again,

I've added an initial spec to get you started with the test cases: 888dc21

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