-
Notifications
You must be signed in to change notification settings - Fork 43
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
jsonDecode is assuming that everything is an array #116
Comments
Could you provide an example where this piece of code breaks because of this assumption? |
For example, when the JSON string passed is |
Do you have a feature file that I can try out so I can see the example with some context? |
Not at the moment. Anyway, you can simply have an endpoint returning |
For values other than arrays you could simply use |
That would prevent me from validating that the content is a proper JSON string |
You could probably do that quite easy with a custom check. I don't personally see the benefit of fixing the existing code for this, but if you want to provide a PR I would most likely merge it. |
jsonDecode method assumes that every value decoded from a JSON string is an array.
This is a wrong assumption since the value can also be a string, a boolean, or null. See also PHP Manual
The text was updated successfully, but these errors were encountered: