semantic-kernel icon indicating copy to clipboard operation
semantic-kernel copied to clipboard

.Net: fix(Redis): RedisJsonMapper excludes unannotated POCO properties from JSON payload

Open nileshpatil6 opened this issue 6 months ago • 0 comments

Fixes #14021

RedisJsonMapper.MapFromDataToStorageModel was serializing the full POCO object via JsonSerializer.SerializeToNode, then removing only the key property. This caused unannotated public properties to be persisted into Redis JSON payloads.

The fix builds the JSON object selectively from model.DataProperties and model.VectorProperties only, matching the approach already used in RedisJsonDynamicMapper.

Updated unit tests to remove NotAnnotated from expected payloads and deleted the existing // TODO: Fix issue where NotAnnotated is being included in the JSON. comments.

nileshpatil6 avatar May 19 '26 18:05 nileshpatil6