Skip to content

Feature: Add custom fields#217

Open
vazarkevych wants to merge 1 commit into
mainfrom
feature/add-custom-fields
Open

Feature: Add custom fields#217
vazarkevych wants to merge 1 commit into
mainfrom
feature/add-custom-fields

Conversation

@vazarkevych

Copy link
Copy Markdown
Collaborator

Summary

Adds support for GrowthBook experiment customFields in the Java SDK.

Changes

  • Added customFields to Experiment so custom fields from GrowthBook API payloads are preserved.
  • Added helper methods on Experiment:
    • getCustomField(String fieldId)
    • getCustomField(String fieldId, Class<T> fieldType)
    • hasCustomField(String fieldId)
  • Added customFields to FeatureRule and its custom Gson deserializer.
  • Propagated customFields from feature rules into the Experiment object returned by feature evaluation.
  • Fixed generic builder inference in FeatureRule.deserialize with FeatureRule.<ValueType>builder().
  • Kept deprecated Namespace support untouched for backward compatibility.

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.

1 participant