Why not deal with the output of ConvertFrom-Json and then, after making the substitution, send the object to the ConvertTo-Yaml?
BTW, your "My json like" example is incorrect. You have to quote the value "S://server/mypath/subdir" or the "S:" will be taken as a JSON primitive and the conversion will fail.