allow json.decode to take byte slice and string

This commit is contained in:
Joel Wetzell
2026-03-08 13:09:22 -05:00
parent 9859aa8fd4
commit 9502201261
3 changed files with 59 additions and 6 deletions

View File

@@ -99,9 +99,9 @@ func TestBadJsonDecode(t *testing.T) {
errorString string
}{
{
name: "non-string input",
payload: []byte("hello"),
errorString: "json.decode processor only accepts a string",
name: "non-string or byte input",
payload: 123,
errorString: "json.decode can only process a string or []byte",
},
{
name: "invalid json",