Hello! I recently started using go-redis version v9.3.1, mainly because it offers support for RedisJSON. However, I encountered an issue while attempting to add an element to an array within a JSON object. The error message I received is "expected value at line 1 column 1."
Here's the JSON object I'm working with:
{
"moves": [
"m1",
"m2"
],
"match_status": 2
}
To insert a value into the "moves" array, I'm utilizing the following function:
db.RedisClientWebSocket.JSONArrAppend(context.Background(), fmt.Sprint("match:", redisMatch.Id.Hex()), "$.moves","m3")
Though I can insert struct after marshaling it. But I can't do the same with string.
My development environment is on go version go1.21.4 for darwin/arm64.