This commit is contained in:
chaos 2024-11-10 16:53:45 +00:00
parent 9d285b6afd
commit 4122ab8e70

View file

@ -83,7 +83,8 @@ def _encodeJSONValuePlainPretty($indent; $currentDepth):
$nextDepthIndent + $nextDepthIndent +
($objectKey | tojson) + ($objectKey | tojson) +
":" + $currentIndentDepthSpace + ":" +
$currentIndentDepthSpace +
($objectValue | _encodeJSONValuePlainPretty($indent; $currentDepth + 1)) ($objectValue | _encodeJSONValuePlainPretty($indent; $currentDepth + 1))
] | join("," + $currentIndentDepthNewline)) + ] | join("," + $currentIndentDepthNewline)) +
$currentIndentDepthNewline + $currentIndentDepthNewline +
@ -137,7 +138,7 @@ def _encodeJSONValueColourCompact:
$value[$objectKey] as $objectValue | $value[$objectKey] as $objectValue |
colourText($objectKey | tojson; "objectKey") + colourText($objectKey | tojson; "objectKey") +
":" + colourText(":"; "object") +
($objectValue | _encodeJSONValueColourCompact) ($objectValue | _encodeJSONValueColourCompact)
] | join(colourText(","; "object"))) + ] | join(colourText(","; "object"))) +
colourText("}"; "object") colourText("}"; "object")
@ -198,7 +199,8 @@ def _encodeJSONValueColourPretty($indent; $currentDepth):
$nextDepthIndent + $nextDepthIndent +
colourText($objectKey | tojson; "objectKey") + colourText($objectKey | tojson; "objectKey") +
":" + $currentIndentDepthSpace + colourText(":"; "object") +
$currentIndentDepthSpace +
($objectValue | _encodeJSONValueColourPretty($indent; $currentDepth + 1)) ($objectValue | _encodeJSONValueColourPretty($indent; $currentDepth + 1))
] | join(colourText(","; "object") + $currentIndentDepthNewline)) + ] | join(colourText(","; "object") + $currentIndentDepthNewline)) +
$currentIndentDepthNewline + $currentIndentDepthNewline +