(experimental) upgraded to encoding/json/v2

This commit is contained in:
Gani Georgiev committed 2026-08-18 18:16:22 +03:00
1 parent 4d4275c9aa
commit 97dd775455
125 files changed
+433 -364

No files matched your search

+2 -1
View File
@@ -2,6 +2,7 @@ package logger
import (
"context"
"encoding/json/v2"
"errors"
"fmt"
"log/slog"
@@ -326,7 +327,7 @@ func TestBatchHandlerAttrsFormat(t *testing.T) {
for i, data := range expected {
t.Run(fmt.Sprintf("log handler %d", i), func(t *testing.T) {
log := beforeLogs[i]
raw, _ := log.Data.MarshalJSON()
raw, _ := json.Marshal(log.Data, json.Deterministic(true))
if string(raw) != data {
t.Fatalf("Expected \n%s \ngot \n%s", data, raw)
}