Repository: quarkusio/quarkus
Issue: Redis GET with byte[] as type leads to unmarshaling exception

### Describe the bug

I'm using this example <https://quarkus.io/guides/redis-reference#storing-binary-data> to get a value storing byte data and I'm getting this exception:
```
io.vertx.core.json.DecodeException: Failed to decode:Illegal character ((CTRL-CHAR, code 5)): only regular white space (\\r, \\n, \\t) is allowed between tokens
 at [Source: (io.netty.buffer.ByteBufInputStream); line: 1, column: 2]
	at io.quarkus.vertx.runtime.jackson.QuarkusJacksonJsonCodec.fromParser(QuarkusJacksonJsonCodec.java:128)
	at io.quarkus.vertx.runtime.jackson.QuarkusJacksonJsonCodec.fromBuffer(QuarkusJacksonJsonCodec.java:100)
	at io.vertx.core.json.Json.decodeValue(Json.java:119)
	at io.quarkus.redis.datasource.codecs.Codecs$JsonCodec.decode(Codecs.java:44)
	at io.quarkus.redis.runtime.datasource.Marshaller.decode(Marshaller.java:92)
	at io.quarkus.redis.runtime.datasource.Marshaller.decode(Marshaller.java:83)
	at io.quarkus.redis.runtime.datasource.AbstractStringCommands.decodeV(AbstractStringCommands.java:59)
	at io.smallrye.context.impl.wrappers.SlowContextualFunction.apply(SlowContextualFunction.java:21)
	at io.smallrye.mutiny.operators.uni.UniOnItemTransform$UniOnItemTransformProcessor.onItem(UniOnItemTransform.java:36)
	at io.smallrye.mutiny.vertx.AsyncResultUni.lambda$subscribe$1(AsyncResultUni.java:35)
```

It seems that even if I'm using a byte[] type it tries to unmarshall the value as JSON.

In `io.quarkus.redis.datasource.codecs.Codecs.getDefaultCodecFor` it defaults to `JsonCodec`, maybe we need a new codec doing nothing for byte[]?

### Expected behavior

_No response_

### Actual behavior

_No response_

### How to Reproduce?

_No response_

### Output of `uname -a` or `ver`

_No response_

### Output of `java -version`

Java 17

### GraalVM version (if different from Java)

_No response_

### Quarkus version or git rev

2.12.2

### Build tool (ie. output of `mvnw --version` or `gradlew --version`)

_No response_

### Additional information

_No response_

Changed files:
extensions/redis-client/runtime/src/test/java/io/quarkus/redis/datasource/ValueCommandsTest.java
extensions/redis-client/runtime/src/main/java/io/quarkus/redis/datasource/codecs/Codecs.java

diff --git a/extensions/redis-client/runtime/src/main/java/io/quarkus/redis/datasource/codecs/Codecs.java b/extensions/redis-client/runtime/src/main/java/io/quarkus/redis/datasource/codecs/Codecs.java
index f08485acd66..4c99de87a09 100644
--- a/extensions/redis-client/runtime/src/main/java/io/quarkus/redis/datasource/codecs/Codecs.java
+++ b/extensions/redis-client/runtime/src/main/java/io/quarkus/redis/datasource/codecs/Codecs.java
@@ -22,6 +22,9 @@ public static <T> Codec<T> getDefaultCodecFor(Class<T> clazz) {
         if (clazz.equals(String.class)) {
             return (Codec<T>) StringCodec.INSTANCE;
         }
+        if (clazz.equals(byte[].class)) {
+            return (Codec<T>) ByteArrayCodec.INSTANCE;
+        }
         // JSON by default
         return new JsonCodec<>(clazz);
     }
@@ -114,4 +117,23 @@ public Integer decode(byte[] item) {
         }
     }
 
+    public static class ByteArrayCodec implements Codec<byte[]> {
+
+        public static ByteArrayCodec INSTANCE = new ByteArrayCodec();
+
+        private ByteArrayCodec() {
+            // Avoid direct instantiation;
+        }
+
+        @Override
+        public byte[] encode(byte[] item) {
+            return item;
+        }
+
+        @Override
+        public byte[] decode(byte[] item) {
+            return item;
+        }
+    }
+
 }
diff --git a/extensions/redis-client/runtime/src/test/java/io/quarkus/redis/datasource/ValueCommandsTest.java b/extensions/redis-client/runtime/src/test/java/io/quarkus/redis/datasource/ValueCommandsTest.java
index 0bd8815e307..387794660d7 100644
--- a/extensions/redis-client/runtime/src/test/java/io/quarkus/redis/datasource/ValueCommandsTest.java
+++ b/extensions/redis-client/runtime/src/test/java/io/quarkus/redis/datasource/ValueCommandsTest.java
@@ -20,6 +20,8 @@
 import io.quarkus.redis.datasource.value.SetArgs;
 import io.quarkus.redis.datasource.value.ValueCommands;
 import io.quarkus.redis.runtime.datasource.BlockingRedisDataSourceImpl;
+import io.vertx.core.json.DecodeException;
+import io.vertx.core.json.Json;
 
 public class ValueCommandsTest extends DatasourceTestBase {
 
@@ -274,5 +276,10 @@ void binary() {
         commands.set(key, content);
         byte[] bytes = commands.get(key);
         assertThat(bytes).isEqualTo(content);
+
+        // Verify that we do not get through the JSON codec (which would base64 encode the byte[])
+        ValueCommands<String, String> cmd = ds.value(String.class);
+        String str = cmd.get(key);
+        assertThatThrownBy(() -> Json.decodeValue(str, byte[].class)).isInstanceOf(DecodeException.class);
     }
 }