cmd/rc: add --json flag for structured JSON input

This commit is contained in:
Nick Craig-Wood
2018-10-26 14:45:44 +01:00
parent bb5637d46a
commit 45d5339fcb
2 changed files with 44 additions and 8 deletions

View File

@@ -67,6 +67,25 @@ $ rclone rc rc/noop param1=one param2=two
Run `rclone rc` on its own to see the help for the installed remote
control commands.
`rclone rc` also supports a `--json` flag which can be used to send
more complicated input parameters.
```
$ rclone rc --json '{ "p1": [1,"2",null,4], "p2": { "a":1, "b":2 } }' rc/noop
{
"p1": [
1,
"2",
null,
4
],
"p2": {
"a": 1,
"b": 2
}
}
```
## Supported commands
<!--- autogenerated start - run make rcdocs - don't edit here -->
### cache/expire: Purge a remote from cache