且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

传递JSON字符串作为命令行参数

更新时间:2023-02-18 16:51:28

使用""将其声明为字符串,并使用\转义另一个",它应该可以工作.

Declare it as a string with "" and escape the other " with \ and it should work.

命令行:

"{\"config\":{\"script\":{\"script_name\":\"test\",\"dir\":\"D:\\test\",\"destination\":\"M:\\neu\\test\",\"params\":\"/b /s /r:3 /w:5\"}}}"