From 9d285b6afd87996221d544b3294f8039891dd43b Mon Sep 17 00:00:00 2001 From: chaos Date: Sun, 10 Nov 2024 16:51:38 +0000 Subject: [PATCH] update --- tool/lib/JSONLib.jq | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tool/lib/JSONLib.jq b/tool/lib/JSONLib.jq index 7a34515..4beb851 100644 --- a/tool/lib/JSONLib.jq +++ b/tool/lib/JSONLib.jq @@ -121,7 +121,7 @@ def _encodeJSONValueColourCompact: ([ $value[] | _encodeJSONValueColourCompact - ] | join(",")) + + ] | join(colourText(","; "array"))) + colourText("]"; "array") else colourText("[]"; "array") @@ -139,7 +139,7 @@ def _encodeJSONValueColourCompact: colourText($objectKey | tojson; "objectKey") + ":" + ($objectValue | _encodeJSONValueColourCompact) - ] | join(",")) + + ] | join(colourText(","; "object"))) + colourText("}"; "object") else colourText("{}"; "object") @@ -178,7 +178,7 @@ def _encodeJSONValueColourPretty($indent; $currentDepth): $value[] | $nextDepthIndent + _encodeJSONValueColourPretty($indent; $currentDepth + 1) - ] | join("," + $currentIndentDepthNewline)) + + ] | join(colourText(","; "array") + $currentIndentDepthNewline)) + $currentIndentDepthNewline + $currentIndentDepthIndent + colourText("]"; "array") @@ -200,7 +200,7 @@ def _encodeJSONValueColourPretty($indent; $currentDepth): colourText($objectKey | tojson; "objectKey") + ":" + $currentIndentDepthSpace + ($objectValue | _encodeJSONValueColourPretty($indent; $currentDepth + 1)) - ] | join("," + $currentIndentDepthNewline)) + + ] | join(colourText(","; "object") + $currentIndentDepthNewline)) + $currentIndentDepthNewline + $currentIndentDepthIndent + colourText("}"; "object")