ps/Modules/Cole.PowerShell.Developer/Public/Write-JsonNameStringValuePair.ps1
2023-05-30 22:51:22 -07:00

16 lines
389 B
PowerShell

function Write-JsonNameStringValuePair {
<#
.SYNOPSIS
Used to write the value for string pairs to a Json object
#>
param (
$JsonName,
$JsonValue,
$Depth = 0,
[switch]$OrderedKeys
)
$spacesString, $shortSpacesString = (Get-JsonStringLeadsByDepth -Depth $Depth)
return ('{0}"{1}" : "{2}",' -f $shortSpacesString, $JsonName, $JsonValue)
}