-
Notifications
You must be signed in to change notification settings - Fork 20
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
Parse into array #5
Comments
I think I found a solution.
Can you think of a caveat in this case? |
prints:
|
Not if you have something more complex, like this:
This will get parsed to this (output from var_dump):
|
Ah, I see. I'm not a PHP dev, this repo was contributed by @iainhallam and @jawb. Is the idiomatic php way to use arrays instead of objects? |
Yes, usually we work with arrays. Also, I think the arguments should emulate the ones of json_decode. |
@iainhallam Would you be OK with changing the API to arrays? @cdarken Would you be willing to do a PR or do you know someone who would? |
I wouldn't say changing, just add an option to allow also arrays. |
Hey, this works fine for me:
|
@4cc355-d3n13d it doesn't, the "setting" key has a stdClass instance as value, it should be array |
also see #7 |
@cdarken parse the array recursively |
Support parsing into associative array (#5)
This is now implemented, thanks @nichtich ! |
How can I get arrays instead of objects ?
The text was updated successfully, but these errors were encountered: