Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Introduce variation method with generic return types #342

Merged
merged 1 commit into from
Feb 15, 2024

Conversation

keelerm84
Copy link
Member

Customers using a JSON flag often prefer the evaluation result return a custom object instead of an LDValue. This commit supports that by introducing a new LDValueDecoder (copied and lightly modified from the Swift Core Libs JSONDecoder implementation).

This decoder allows decoding into arbitrary types directly from an LDValue, without paying the penalty for an intermediate JSON encoding step (i.e. LDValue -> JSON str -> Custom Type).

@keelerm84 keelerm84 requested a review from a team February 15, 2024 14:43
Copy link

Customers using a JSON flag often prefer the evaluation result return a
custom object instead of an LDValue. This commit supports that by
introducing a new `LDValueDecoder` (copied and lightly modified from the
Swift Core Libs `JSONDecoder` implementation).

This decoder allows decoding into arbitrary types directly from an
LDValue, without paying the penalty for an intermediate JSON encoding
step (i.e. LDValue -> JSON str -> Custom Type).
@keelerm84 keelerm84 merged commit 7ff2ffb into v9 Feb 15, 2024
4 checks passed
@keelerm84 keelerm84 deleted the mk/sc-160632/ld-value-raw branch February 15, 2024 16:45
keelerm84 pushed a commit that referenced this pull request Feb 22, 2024
🤖 I have created a release *beep* *boop*
---


##
[9.4.0](9.3.0...9.4.0)
(2024-02-21)


### Features

* Add new identify method with time out support
([#344](#344))
([34ba8ab](34ba8ab))
* Implement shedding identity queue
([#343](#343))
([393a28c](393a28c))
* Introduce variation method with generic return types
([#342](#342))
([7ff2ffb](7ff2ffb))


### Bug Fixes

* Add privacy manifest
([#334](#334))
([154fde7](154fde7))
* Ensure anonymous context is valid
([#338](#338))
([65406cc](65406cc))
* Replace simple logger with os_log statements
([#340](#340))
([7ba4397](7ba4397))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: LaunchDarklyReleaseBot <LaunchDarklyReleaseBot@launchdarkly.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants