Skip to content

Inline JSON help

Paymaun edited this page Jan 5, 2023 · 2 revisions

Use quotation mark properly for command continuation

When you work with Azure CLI commands, be aware of how your shell uses quotation marks and escapes characters.

For example, when the command contains inline json such as:

{"key" : "value"}

  • For bash inline json format use '{"key" : "value"}' and \ (backslash) for command continuation:

  • For powershell inline json format use '{\"key\":\"value\"}' and ` (tilde) for command continuation:

  • For cmd inline json format use "{\"key\":\"value\"}" and ^ (caret) for command continuation:

  • For file based json input use "@/path/to/file". File based input avoids shell quotation issues.

For more information, please take a look at Use quotation marks in parameters.

Clone this wiki locally