optimizely / optimizely/java-sdk
Pick Serializer using properties
还没有人认领这个 Issue。
- 主要语言
- Java
- 星标
- 44
- 派生
- 32
- 平均合并
- 8 小时 39 分钟
- 30 天内合并 PR
- 1
描述
Hello Optimizely team:
We have encountered issues while working with Optimizely. The SDK allows to use two different serialisers in an uncontrolled way, by letting you pick one using optimizely.properties (in out experience, it is used while retrieving your organisation experiments file, I don't know for what else it is used):
DefaultConfigParser
But in this one where the events are raised, since it is an if/else structure, you have no control over it, and in our case it does not work because we use a Jackson version previous to 2.7, throwing an exception while trying to create it with the SNAKE_CASE property (one exception that we will avoid if GSON could be chosen):
DefaultJsonSerializer
I feel like this is an inconsistency and since it is already implemented for one scenario, it should be paired for the event ones.
We also know that this is our fault for not using that Jackson version, but it is done in a service where that specific library is almost impossible to update... We have discarded the idea of integrating Optimizely in that specific service, but we thought that it was important to let you know this weird behaviour where you can have GSON (or any other one) + Jackson (or any other one) working simultaneously.
Thanks for reading, let us know if you change anything about this!
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
首先比较 core-api/src/main/java/com/optimizely/ab/config/parser/DefaultConfigParser.java 和 core-api/src/main/java/com/optimizely/ab/event/internal/serializer/DefaultJsonSerializer.java,重点关注 optimizely.properties 如何选择 serializer。确认事件序列化可以遵循相同的选择,并验证 GSON 和 Jackson 配置是否都能一致地工作。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- java
- 领域
- api
- Issue 类型
- 功能
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 45/100