From 4de59bc10e82583f2fe19682fbf08e5efdacea2d Mon Sep 17 00:00:00 2001 From: Jesse Chen Date: Wed, 4 Jun 2025 13:39:43 -0700 Subject: [PATCH] go prefixedwriter: only try strings with { prefix as JSON --- clireporter/prefixedwriter.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/clireporter/prefixedwriter.go b/clireporter/prefixedwriter.go index 6769bdd..ef7407c 100644 --- a/clireporter/prefixedwriter.go +++ b/clireporter/prefixedwriter.go @@ -88,9 +88,7 @@ func isLikelyJSON(data []byte) bool { } first := trimmed[0] - // JSON objects start with {, arrays with [, strings with ", and we'll be conservative - // and only format these as JSON. Standalone numbers, booleans, null shouldn't be reformatted. - return first == '{' || first == '[' || first == '"' + return first == '{' } func (w *PrefixedWriter) Write(p []byte) (n int, err error) {