We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Currently I use the windows 10 x64 OpenServer and I have a problem with slashes in JSON.parse().
JSON.parse()
VM444:1 Uncaught SyntaxError: Unexpected token D in JSON at position 10 at JSON.parse (<anonymous>) at (index):477
Page source:
root = JSON.parse('{"name":"\\D:\\OpenServer\\domains\\opcache-status","children":[{"name":"vendor","children":[{"name":"rlerdorf","children":[{"name":"opcache-status","children":[{"name":"opcache.php","size":54152}]}]}]},{"name":"index.php","size":712}]}');
My solution:
root = JSON.parse('<?php echo json_encode(str_replace('\\', '/', $dataModel->getD3Scripts())); ?>');
Result:
root = JSON.parse('{"name":"\/D:\/OpenServer\/domains\/opcache-status","children":[{"name":"vendor","children":[{"name":"rlerdorf","children":[{"name":"opcache-status","children":[{"name":"opcache.php","size":54464}]}]}]},{"name":"index.php","size":712}]}');
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Currently I use the windows 10 x64 OpenServer and I have a problem with slashes in
JSON.parse()
.Page source:
My solution:
Result:
The text was updated successfully, but these errors were encountered: