Skip to content

Patch JSON Files

Sandor edited this page Oct 9, 2016 · 4 revisions

Icon

With this task, you can patch JSON files using JSON patch syntax.

Add the task to your Build or Release Definition

Add-Tasks

You will find the task in the "Utility" category.

Configuration

Configure-JsonPatch

General

  • Syntax type - The syntax used for the patch content. See documentation for more information.
  • Patch working directory - Working directory. Example: $(Build.SourcesDirectory)
  • Target files - Patch target file. Example: appsettings*.json
  • Patch Content - Patch content.
  • Output patched file in logs - Output patched file in logs
  • Use JSON5 - Enable JSON5 parser. JSON5 is a relaxed and relaxing extension to JSON.
  • Produce JSON5 - If checked, the task will produce JSON5 content (incompatible with most JSON parser).