-
-
Notifications
You must be signed in to change notification settings - Fork 63
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
Change default decoding structure from array to object #37
Comments
Sorry to hijack your thread, BY default JSONMachine FROM File return Object right now. How do i return as Array?
|
The $x = JsonMachine::fromFile('myjson');
foreach ($x as $item) {
echo(gettype($item)); // array
} |
I see thank you. Let say for example i have JSON with the following format.
|
Is there a way to Return it as an Array instead of an object directly? I try converting it after reading it. The data malformed. |
Can you please post your question to Github Discussions to Q&A category? New topic - Q&A. Let's continue there. Thank you. |
Done in |
This will make it more predictable as
json_decode
works the same way.The only thing needed to do is to change the line with default instantiation of
ExtJsonDecoder
inParser
.Huge BC break - will wait to version 1.0
The text was updated successfully, but these errors were encountered: