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

Unexpected token ' in JSON at position 0 #77

Open
zer0factor opened this issue Sep 26, 2023 · 0 comments
Open

Unexpected token ' in JSON at position 0 #77

zer0factor opened this issue Sep 26, 2023 · 0 comments

Comments

@zer0factor
Copy link

Ran into this problem when creating a bash script.
#!/bin/sh
echo --- Getting link ---
link=123
echo --- Link aquired ---

SURI="'{"'"uri"'":"'"'"$link"'"'"}'"
echo PhasedURI "$SURI"

syno dl createTask --payload "$SURI"

[ERROR] : JSON Exception : SyntaxError: Unexpected token ' in JSON at position 0
at JSON.parse ()
at execute (/usr/local/lib/node_modules/syno/bin/syno.js:49:20)
at Command. (/usr/local/lib/node_modules/syno/bin/syno.js:292:10)
at Command.listener (/usr/local/lib/node_modules/syno/node_modules/commander/index.js:370:29)
at Command.emit (node:events:513:28)
at Command.parseArgs (/usr/local/lib/node_modules/syno/node_modules/commander/index.js:892:12)
at Command.parse (/usr/local/lib/node_modules/syno/node_modules/commander/index.js:642:21)
at Object. (/usr/local/lib/node_modules/syno/bin/syno.js:353:9)
at Module._compile (node:internal/modules/cjs/loader:1254:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1308:10)

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

1 participant