How to use Slick Syntax - geeklearningio/gl-vsts-tasks-file-patch GitHub Wiki
By default tasks will use the default JSON patch syntax with is a bit verbose. XML and JSON patch tasks support an enhanced minimal syntax:
the general form is :
op path => valueOrPath
where :
- op will be the character mapped for the operation
+
add-
remove (in that case => valueOrPath should be ommitted)=
replace&
copy>
move?
test
- path is the
path
orfrom path
forcopy
andmove
operation. - valueOrPath is the
json encoded value
or thetarget path
forcopy
andmove
operation.
Example
The following patch :
+ /version/notes => "a bullshit"
= /version/semver => "$(GITVERSION_SemVer)"
Applied to
{
"version" : {
"semver" : ""
},
"name" : "un nom"
}
will output
{
"version":{
"semver":"0.1.0",
"notes":"a bullshit"
},
"name":"un nom"
}