I'm trying to set and get JSON results in redis with redis-om anyway it uses Stackexchange.Redis even with that the same exception repects.
using System;
using StackExchange.Redis;
namespace test
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Hello World!");
var muxe = ConnectionMultiplexer.Connect("localhost");
var db = muxe.GetDatabase();
var JSONResult = db.CreateTransaction();
db.Execute("JSON.SET", "dog:1", "$", "{\"name\":\"Honey\",\"breed\":\"Greyhound\"}");
db.Execute("JSON.GET", "dog:1", "$.breed");
JSONResult.Execute();
Console.WriteLine("I'm ok");
}
}
}
Exception: StackExchange.Redis.RedisServerException: 'ERR unknown command `JSON.SET`,
I missed with Redis moudle because alpine image only have core funs some of the modules are not present with the same. please check the redis modules.
redis-cli info modules