Is there a way to convert yaml textual data(from python requests on Flask) to json format, or at least exract key value pairs. config.yaml:
apiVersion: v1
kind: ConfigMap
metadata:
name: confmap
data:
key1: value1
key2: value2
#randominline
key3: "string_value"
key4: value4
...
I am using python request to get this yaml file from http:
result = requests.get(URL, verify=False)
print(result.text) #prints text from yaml files.
Is there a way now to convert this textual formated yaml file to json format, or at least to extract key value?