semantic-kernel
semantic-kernel copied to clipboard
.Net: fix(Redis): RedisJsonMapper excludes unannotated POCO properties from JSON payload
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.