From 05ac8eb870f4849ddce02b34f253cc5455a67c18 Mon Sep 17 00:00:00 2001 From: Thomas von Dein Date: Mon, 13 Jul 2026 12:32:43 +0200 Subject: [PATCH] prepared for the new jsonv2 mod --- pkg/es/cluser_health_report.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/pkg/es/cluser_health_report.go b/pkg/es/cluser_health_report.go index e751e51..9a11d27 100644 --- a/pkg/es/cluser_health_report.go +++ b/pkg/es/cluser_health_report.go @@ -17,6 +17,9 @@ along with this program. If not, see . package es import ( + + // "encoding/json/jsontext" + // "encoding/json/v2" "encoding/json" "fmt" @@ -51,6 +54,15 @@ func getHealthReport(conf *cfg.Config) (*HealthReport, error) { report := HealthReport{} + // FIXME: use this once jsonv2 is no more experimental + // + // if err := json.UnmarshalDecode( + // jsontext.NewDecoder( + // bytes.NewBuffer(raw)), + // &report); err != nil { + // return nil, fmt.Errorf("failed to unmarshal healthreport response: %w", err) + // } + if err := json.Unmarshal(raw, &report); err != nil { return nil, fmt.Errorf("failed to unmarshal healthreport response: %w", err) }