0

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`, 
5
  • How did you run the server? it seems like the JSON module is missing. See redis-stack for more details redis.io/docs/stack Commented Sep 4, 2022 at 9:43
  • yes I used Redis alpine image so the module is missed Commented Sep 5, 2022 at 16:24
  • Why did you delete stackoverflow.com/questions/74299901/… ? Commented Nov 3, 2022 at 9:23
  • I'll repost the same @Enigmativity Commented Nov 3, 2022 at 9:32
  • @JeevananthanS - When will you? Commented Nov 3, 2022 at 10:09

1 Answer 1

1

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
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.