This feature substitutes values in the JSON configuration files. It overrides the values in the specified JSON configuration files (for example, appsettings.json) with the values matching names of release pipeline and stage variables.

To substitute variables in specific JSON files, provide newline-separated list of JSON files. File names must be specified relative to the root folder.

If you want to substitute values in appsettings.json, enter the relative path from the root folder; for example content/website/appsettings.json. Alternatively, use wildcard patterns to search for specific JSON files.

For more details, you could refer to this article.

Answer from Joey Cai on Stack Overflow
Discussions

Variable substitution with dynamic JSON
Hi, I’m creating an eCommerce B2B ordering process where the details of a product are looked up in a catalogue using a service task with the HTTP connector. The product is then ordered from the supplier using another service task with the HTTP connector. In the 1st task I’m retrieving some ... More on forum.camunda.io
🌐 forum.camunda.io
0
0
November 16, 2021
How can I replace these json values with variables?
When working with the JSON within Python, you probably want to treat it as a Dictionary. Then you can update name like this: person_json[“name”] = “Fred” You can load a JSON string as a Dict using json.loads() and export back out as JSON using json.dumps(). More on reddit.com
🌐 r/learnpython
12
2
January 16, 2021
substitute variables in appsettings.json file
I have DONTNET code pipeline and I need to substitute variables from appsettings.json file. Can you please give me an example? This is part of my More on community.atlassian.com
🌐 community.atlassian.com
July 2, 2024
How can I substitute values in a JSON file?
Can you give an example of what you're doing? Because I don't understand why you're having to do things like "There are places in that JSON that you have to substitute with the values provided by queries in Django." More on reddit.com
🌐 r/django
6
1
April 26, 2023
🌐
Camunda
forum.camunda.io › camunda 7 topics › discussion & questions
Variable substitution with dynamic JSON - Discussion & Questions - Camunda Forum
November 16, 2021 - Hi, I’m creating an eCommerce B2B ordering process where the details of a product are looked up in a catalogue using a service task with the HTTP connector. The product is then ordered from the supplier using another service task with the HTTP connector. In the 1st task I’m retrieving some ...
🌐
Reddit
reddit.com › r/learnpython › how can i replace these json values with variables?
r/learnpython on Reddit: How can I replace these json values with variables?
January 16, 2021 -

I am trying to make a python script which generates json. I know bash but not python.

I know this is easy, but I cannot figure it out. How do I replace these values with variables? I guess I don't how to call a variable like you can like this in bash: $variable

Thanks.

import json

person_json = {
"name": "Fred",
"place": "Melbourne",
"sex": "male",
"remote": { "addr": "Acacia Avenue", "id": "875932875392" },
"local": { "id": "8475974", "office": "Main" }
}
🌐
Atlassian Community
community.atlassian.com › q&a › bitbucket › questions › substitute variables in appsettings.json file
substitute variables in appsettings.json file
July 2, 2024 - With that in mind, I'm not really familiar with the DotNet core variable syntax, but I found the following article that may help you with the variable substitution on the appsettings.json :
🌐
Reddit
reddit.com › r/django › how can i substitute values in a json file?
r/django on Reddit: How can I substitute values in a JSON file?
April 26, 2023 -

When working with Slack APIs, it is very common to have huge blocks of JSON to work with. There are places in that JSON that you have to substitute with the values provided by queries in Django.

In my previous project, I maintained these JSON values in Python files and wrote my own substitution. But this time I feel like using JSON files given the project structure, I tried using render_to_string() but it's not very friendly if a user sends text from client/frontend including special characters.

Have you encountered such a problem before? Any other strategy I can try?

Find elsewhere
🌐
James Still
squarewidget.com › json-variable-substitution-in-multi-stage-yaml-azure-pipeline
JSON Variable Substitution in Multi-Stage YAML Azure Pipeline – James Still
August 3, 2020 - Now we need to reference these variables in the CI/CD pipeline. In order for JSON variable substitution to work the variable name in my YAML file must match exactly the variable name in my appsettings.json file. Nested elements must be dot-delimited. So in my appsettings.json file above SecretOne is a top-level standalone element and my YAML variable can just be SecretOne.
🌐
Microsoft Learn
learn.microsoft.com › en-us › azure › devops › pipelines › tasks › reference › file-transform-v2
FileTransform@2 - File transform v2 task | Microsoft Learn
March 2, 2026 - If you need XML transformation ... · To substitute JSON variables that are nested or hierarchical, specify them using JSONPath expressions....
🌐
HashiCorp Discuss
discuss.hashicorp.com › terraform
How to refer to variables in a JSON configuration file - Terraform - HashiCorp Discuss
January 13, 2022 - When I try, it just passes the string module.nsg.security_groups.id I also tried ${module.nsg.security_groupds.id) · Hi @brandootr! You bumped a very old topic and so I’ve moved your question into a separate topic so we can discuss it without creating notification noise for those who ...
🌐
James Still
squarewidget.com › json-variable-substitution-in-multi-stage-yaml-pipeline-with-azure-key-vault
JSON Variable Substitution in Multi-Stage YAML Pipeline with Azure Key Vault – James Still
August 8, 2020 - The variable group name must match the name you gave it in the Azure DevOps portal. And the variable name must match the name in your appsettings.json file for the substitution to occur. The variable value uses the standard macro syntax $() to reference the linked secret name in the key vault.
🌐
Coding With Taz
codingwithtaz.blog › 2020 › 09 › 13 › azure-pipelines-parameters-and-file-substitution
Azure Pipelines – Parameters + JSON File Substitution | Coding With Taz
February 6, 2022 - So we could create a basic pipeline for the substitution : trigger: none pool: vmImage: 'windows-latest' variables: appsettingsfile: appsettings.json WeatherSettings.DefaultTemperatureType: 'Fahrenheit' WeatherSettings.DefaultWindType: 'KMH' WeatherSettings.DefaultTemp: 12 WeatherSettings.ShowTemp: false steps: - task: FileTransform@2 displayName: "Transform Json" inputs: folderPath: '$(System.DefaultWorkingDirectory)/**/' xmlTransformationRules: '' jsonTargetFiles: '**/$(appsettingsfile)' - bash: | cat $(appsettingsfile) displayName: "Show Json substitution"
🌐
OpenClaw
docs.openclaw.ai › gateway › configuration
Configuration - OpenClaw
February 23, 2026 - OpenClaw reads an optional JSON5 config from ~/.openclaw/openclaw.json. If the file is missing, OpenClaw uses safe defaults.
🌐
Mozilla
developer.mozilla.org › en-US › docs › Web › JavaScript › Guide › Regular_expressions
Regular expressions - JavaScript | MDN
1 month ago - Regular expressions are patterns used to match character combinations in strings. In JavaScript, regular expressions are also objects. These patterns are used with the exec() and test() methods of RegExp, and with the match(), matchAll(), replace(), replaceAll(), search(), and split() methods ...
🌐
Next Intl
next-intl.dev
next-intl – Internationalization (i18n) for Next.js
$ next build Route Size First load JS┌ ● / 1.5 kB 102 kB├ ● /about 2.2 kB 102 kB└ λ /[username] 3.6 kB 104 kB ● (SSG) automatically generated as static HTML + JSON
🌐
Google
docs.cloud.google.com › cloud build › substituting variable values
Substituting variable values | Cloud Build | Google Cloud Documentation
To override the substitution value you specified in the build config file, use the --substitutions flag in the gcloud builds submit command. Note that substitutions are a mapping of variables to values rather than arrays or sequences. You can override default substitution variable values except for $PROJECT_ID and $BUILD_ID.
🌐
Openai
developers.openai.com › api › docs › guides › text
Text generation | OpenAI API
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 from openai import OpenAI client = OpenAI() response = client.responses.create( model="gpt-5", prompt={ "id": "pmpt_abc123", "version": "2", "variables": { "customer_name": "Jane Doe", "product": "40oz juice box" } } ) print(response.output_text) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 curl https://api.openai.com/v1/responses \ -H "Authorization: Bearer $OPENAI_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "gpt-5", "prompt": { "id": "pmpt_abc123", "version": "2", "variables": { "customer_name": "Jane Doe", "product": "40oz juice box" } } }'
🌐
GitHub
github.com › Microsoft › vsts-tasks › issues › 8076
IIS Web App Deploy: JSON Variable Substitution and Variable Groups · Issue #8076 · microsoft/azure-pipelines-tasks
August 20, 2018 - I'm trying to do a JSON variable susbtitution on path "**/appsettings.json" using a Variable Group bound to my deploy environment. The thing is, on the log, there is no error and the agent says the substitution was done successfully.
Author   SuricateCan
🌐
Visual Studio Code
code.visualstudio.com › docs › reference › variables-reference
Variables reference
November 3, 2021 - This means that variables cannot depend on each other (which ensures isolation and makes substitution robust against evaluation order). The predefined variables are supported in a select number of setting keys in settings.json files such as the terminal cwd, env, shell and shellArgs values.