16 lines
389 B
PowerShell
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)
|
|
} |