Skip to content

Commit ce3d42d

Browse files
committed
UpdateJsonFileTask: Added support to update boolean value
1 parent 353c207 commit ce3d42d

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

src/FlubuCore/Tasks/Text/UpdateJsonFileTask.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,18 @@ public UpdateJsonFileTask Update(string path, decimal value)
110110
return this;
111111
}
112112

113+
/// <summary>
114+
/// Updates json property/element with specified value,
115+
/// </summary>
116+
/// <param name="path">Json path to the element to be updated</param>
117+
/// <param name="value">New value of the json element</param>
118+
/// <returns></returns>
119+
public UpdateJsonFileTask Update(string path, bool value)
120+
{
121+
_updates.Add(path, new JValue(value));
122+
return this;
123+
}
124+
113125
/// <summary>
114126
/// Updates json property/element with specified value,
115127
/// </summary>

0 commit comments

Comments
 (0)