From 4122ab8e707a655804b64cee349849558290f718 Mon Sep 17 00:00:00 2001 From: chaos Date: Sun, 10 Nov 2024 16:53:45 +0000 Subject: [PATCH] update --- tool/lib/JSONLib.jq | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tool/lib/JSONLib.jq b/tool/lib/JSONLib.jq index 4beb851..5057f9c 100644 --- a/tool/lib/JSONLib.jq +++ b/tool/lib/JSONLib.jq @@ -83,7 +83,8 @@ def _encodeJSONValuePlainPretty($indent; $currentDepth): $nextDepthIndent + ($objectKey | tojson) + - ":" + $currentIndentDepthSpace + + ":" + + $currentIndentDepthSpace + ($objectValue | _encodeJSONValuePlainPretty($indent; $currentDepth + 1)) ] | join("," + $currentIndentDepthNewline)) + $currentIndentDepthNewline + @@ -137,7 +138,7 @@ def _encodeJSONValueColourCompact: $value[$objectKey] as $objectValue | colourText($objectKey | tojson; "objectKey") + - ":" + + colourText(":"; "object") + ($objectValue | _encodeJSONValueColourCompact) ] | join(colourText(","; "object"))) + colourText("}"; "object") @@ -198,7 +199,8 @@ def _encodeJSONValueColourPretty($indent; $currentDepth): $nextDepthIndent + colourText($objectKey | tojson; "objectKey") + - ":" + $currentIndentDepthSpace + + colourText(":"; "object") + + $currentIndentDepthSpace + ($objectValue | _encodeJSONValueColourPretty($indent; $currentDepth + 1)) ] | join(colourText(","; "object") + $currentIndentDepthNewline)) + $currentIndentDepthNewline +