Articles in this section

When does a variable require JSON formatting?

Question

When providing environment variables, you have the option to provide JSON formatted values. 

What would be the deciding factor to create a JSON formatted variable?

 

Answer

JSON formatted variables are useful if you are trying to store variables like arrays.

For example, Google Cloud or Firebase third-party vendors provide more than one keys as Credentials, so they would make sense to be added as a JSON environment variable.

 

GCP_CREDENTIALS
{
  "API_KEY": "***********",
  "CLIENT_ID": "1234567890-abc123getExample.apps.googleusercontent.com",
  "USER_NAME": "exampleid.iam.gserviceaccount.com",
  "PROJECT_ID": "my-awesome-project",
  "AUTH_URI": "https://accounts.google.com/o/oauth2/auth"
}
Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.