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

Parser fails with "Syntax error '[' At position N" #4

Closed
rybakit opened this issue Jan 10, 2019 · 2 comments
Closed

Parser fails with "Syntax error '[' At position N" #4

rybakit opened this issue Jan 10, 2019 · 2 comments

Comments

@rybakit
Copy link

rybakit commented Jan 10, 2019

// works
// $json = '{"result":{"items":[]}}';

// throws the SyntaxError exception because of `"foo":[]`
$json = '{"result":{"foo":[], "items":[]}}'; 

$items = \JsonMachine\JsonMachine::fromString($json, "/result/items");
foreach ($items as $name => $data) {
        echo $data, "\n";
}
@halaxa
Copy link
Owner

halaxa commented Jan 11, 2019 via email

@rybakit
Copy link
Author

rybakit commented Jan 12, 2019

@halaxa Done #5.

@rybakit rybakit closed this as completed Jan 12, 2019
@LagShaggy LagShaggy mentioned this issue Mar 24, 2022
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

No branches or pull requests

2 participants