OpenFeature supports Datetime types for context attributes, but Flagsmith traits do not.
Because of this, the OpenFeature provider has to make a copy of all the traits and map any Date objects into strings, which we've added in open-feature/js-sdk-contrib#1351. The OpenFeature provider could potentially have some smarter logic/caching to avoid this copying, but this is overkill for what should be a simple adapter on top of the Flagsmith SDK.
Ideally, the Flagsmith SDK should natively support Date objects, and only serialise them into strings when needed. This avoids having to make a copy of the entire evaluation context whenever it changes, and makes the OpenFeature provider implementation simpler and faster.
OpenFeature supports Datetime types for context attributes, but Flagsmith traits do not.
Because of this, the OpenFeature provider has to make a copy of all the traits and map any
Dateobjects into strings, which we've added in open-feature/js-sdk-contrib#1351. The OpenFeature provider could potentially have some smarter logic/caching to avoid this copying, but this is overkill for what should be a simple adapter on top of the Flagsmith SDK.Ideally, the Flagsmith SDK should natively support
Dateobjects, and only serialise them into strings when needed. This avoids having to make a copy of the entire evaluation context whenever it changes, and makes the OpenFeature provider implementation simpler and faster.