MSetAsync Set for one Property to null
Thanks for reporting an issue in NRedisStack! Please update the appropriate text below, as much data as possible really helps!
NRedisStack Version: 0.13.0
Redis Stack Version: 7.4.0-v1
Description:
When using MSetAsync and passing multiple KeyPathValues to it I can not pass in one KeyPathValue with null as value. I have a fix for this. I need to basically map null to "null", but this is inconsistend with the Set Command.
That one does not accept "null" but only null.
This array:
Leads to this exception: StackExchange.Redis.RedisServerException: expected value at line 1 column 1 at NRedisStack.Auxiliary.ExecuteAsync(IDatabaseAsync db, SerializedCommand command) at NRedisStack.JsonCommandsAsync.MSetAsync(KeyPathValue[] KeyPathValueList)
hi @kurtisane , thank you for using NRedisStack and letting us about the case your are experiencing. i was trying to reproduce the case with null values, yet not successful..
could you check if this exception shows up even when you drop the string value at index 0 in screenshot (the one starts with 2UZb_.....).
i believe the issue is due to misuse of value field KeyPathValue type for string values.
if that is the case, could you try to do something like below to handle the case for strings;
values = new[]
{
new KeyPathValue("key1", "$.textField1", "\"someText\""),
new KeyPathValue("key1", "$.textField2", JsonValue.Create("someText")),
new KeyPathValue("key1", "$.textField3", null),
};
This issue has been marked as stale because it requires additional information that has not been provided for 30 days. It will be closed in 7 days if the requested information is not provided.
This issue has been closed because the requested information was not provided within the specified timeframe. If you can provide the missing information, please reopen this issue or create a new one.