leafac / obs-cli

Remote control OBS from the command line

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Trouble with JSON Syntax

tja824 opened this issue · comments

I've discovered a parsing issue (I think) with the latest executable for Windows:

 PS C:\Users\me\Downloads> .\obs-cli-win.exe --version
2.2.3
PS C:\Users\me\Downloads> .\obs-cli-win.exe -p password SetCurrentScene='{ "scene-name": "PPTXScene2" }'
Unexpected token s in JSON at position 2

I've tried about everything I can think of to get this to work, but I keep getting the 'Unexpected token' error. Is this a bug?

It took me a while (and buying a PC) to figure this out. obs-cli is fine; the issue is the quotes in PowerShell. The following works:

> .\obs-cli-win.exe -p password "SetCurrentScene={ \""scene-name\"": \""PPTXScene2\"" }"