Files
fil/e2e/go/helpers_test.go

14 lines
315 B
Go
Raw Permalink Normal View History

2026-06-01 23:40:55 +02:00
package e2e_test
import "encoding/json"
// jsonString converts a value to its JSON string representation.
// Array fields use jsonString instead of fmt.Sprint to preserve structure.
func jsonString(value any) string {
encoded, err := json.Marshal(value)
if err != nil {
return ""
}
return string(encoded)
}