diff --git a/pkg/tuple/strings.go b/pkg/tuple/strings.go index 2a3ddccc78..8da5367a0a 100644 --- a/pkg/tuple/strings.go +++ b/pkg/tuple/strings.go @@ -4,6 +4,7 @@ import ( "sort" "strings" + "google.golang.org/protobuf/encoding/protojson" "google.golang.org/protobuf/types/known/structpb" core "github.com/authzed/spicedb/pkg/proto/core/v1" @@ -131,7 +132,9 @@ func StringCaveatContext(context *structpb.Struct) (string, error) { return "", nil } - contextBytes, err := context.MarshalJSON() + contextBytes, err := protojson.MarshalOptions{ + Multiline: false, + }.Marshal(context) if err != nil { return "", err }