Skip to content

JSONC is not parsed successfully by json.loads in Python2. #2924

Description

Environment summary

Install Method: How did you install the CLI? (e.g. pip, interactive script, apt-get, Docker, MSI, nightly)
Answer here: dev_setup.py

CLI Version: What version of the CLI and modules are installed? (Use az --version)
Answer here: 2.0.2

OS Version: What OS and version are you using?
Answer here: macOS Sierra

Shell Type: What shell are you using? (e.g. bash, cmd.exe, Bash on Windows)
Answer here: bash, cmd.exe

Python Version: 2.7.11


Description

Running the example in the example:

az keyvault certificate create --vault-name myvault -n cert1 -p "$(az keyvault certificate get-default-policy)"

results in the following error on bash (Python 2.7.11):

invalid syntax: "attributes": {

Alternate ways of accomplishing this (for example piping) generate the same error.

If I run this on Windows with cmd.exe it works in Python 3. In Python 2 I get an error:

Property policy.x509_props has invalid value. Invalid X.500 distinguished name
Property policy.key_props has invalid value. Invalid Kty UlNB
Property policy.secret_props has invalid value. ContentType is invalid

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions