function Write-JsonNamePrimitiveValuePair { <# .SYNOPSIS Used to write the value for primitive 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.ToString().ToLower()) }