-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
You could use just a regular dict object and get the string version from it for format the json more easily
data = {
"pattern": url_where_certificate_will_be_send,`
"filter": {
"ISSUER": {
"CN": issuer.CN,
"C": issuer.C,
"O": issuer.O
},
"SUBJECT": {
"CN": subject.CN,
"C": subject.C,
"O": subject.O
}
}
}
And in case quotes become a problem: data = data.replace('\'', '"')
You can even use the built-in json library
from json import dumps
data = json.dumps(data, ensure_ascii=False) # if you want to visualize the data, just set a value for the **indent** variable
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels