This snippet will convert a PEM based certificate of key to JSON format. This is useful when having to embed a certificate in a JSON object.
It will simply add \n
in the required places.
The snipped was copied from here: https://docs.vmware.com/en/Unified-Access-Gateway/2.9/com.vmware.access-point-29-deploy-config/GUID-870AF51F-AB37-4D6C-B9F5-4BFEB18F11E9.html
"---- BEGIN SSH2 PUBLIC KEY ----
Comment: "rsa-key-20191003"
AAAAB3NzaC1yc2EAAAABJQAAAQEAyVL47bCG41zJu2tdWEwPQwrzb+ettT+o5zl2
2ERrlx5oV2UQ4msjPZN5cWtHeeNsGBpG9J/+vbZF8uEYbVY640fRI7YjmIlNDUp6
a41IVQvHS15uyKJx6kfFMubkdjzrlzmMAYHfHp1B32bnSjgkkM87L+p/C4z7RaK4
CLiUzWGTyhYOmRuo6zIFUVbpi3Fo/HOIiDq6o3PFd9tkdrzgGDtIZsDA77+6QQpw
y4PwjxfSl53We1YiQ4+pwWfwBoSr6WnuSEropxeBnNpKXnGcij6yrHGppZCF/Qjx
c65YvrIxrVVER+gN/AuX24cRG0HjsUP2dcsTBhOJfBE3Z8GI7Q==
---- END SSH2 PUBLIC KEY ----
"