Repository navigation
Commit 4e1af7b
committed
[FSSDK-12813] Emit variation_id as JSON null instead of stripping the key
JacksonSerializer sets Include.NON_NULL globally, so any null field is
dropped from the wire payload unless overridden at the field level.
campaign_id and experiment_id already carried @JsonInclude(ALWAYS);
variation_id did not, so once normalization began returning null for
non-numeric / empty inputs, the entire variation_id key disappeared from
the payload — breaking cross-SDK byte-equivalence (all other SDKs emit
explicit JSON null).
Added @JsonInclude(ALWAYS) on Decision.variationId, plus a focused
serializer test that asserts "variation_id":null is present in the
serialized output when the value is null.1 parent a973d9b commit 4e1af7b
2 files changed
Lines changed: 48 additions & 0 deletions
File tree
- core-api/src
- main/java/com/optimizely/ab/event/internal/payload
- test/java/com/optimizely/ab/event/internal/serializer
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
30 | 31 | | |
31 | 32 | | |
32 | 33 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
151 | 151 | | |
152 | 152 | | |
153 | 153 | | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
154 | 201 | | |
0 commit comments