File tree Expand file tree Collapse file tree 3 files changed +10
-6
lines changed
main/java/com/optimizely/ab/event/internal/serializer
test/java/com/optimizely/ab/event/internal/serializer Expand file tree Collapse file tree 3 files changed +10
-6
lines changed Original file line number Diff line number Diff line change 11/**
22 *
3- * Copyright 2016-2017, 2019, Optimizely and contributors
3+ * Copyright 2016-2017, 2019, 2025 Optimizely and contributors
44 *
55 * Licensed under the Apache License, Version 2.0 (the "License");
66 * you may not use this file except in compliance with the License.
1919import com .fasterxml .jackson .annotation .JsonInclude ;
2020import com .fasterxml .jackson .core .JsonProcessingException ;
2121import com .fasterxml .jackson .databind .ObjectMapper ;
22- import com .fasterxml .jackson .databind .PropertyNamingStrategy ;
22+ import com .fasterxml .jackson .databind .PropertyNamingStrategies ;
2323
2424class JacksonSerializer implements Serializer {
2525
2626 private ObjectMapper mapper =
2727 new ObjectMapper ().setPropertyNamingStrategy (
28- PropertyNamingStrategy .SNAKE_CASE );
28+ PropertyNamingStrategies .SNAKE_CASE );
2929
3030 public <T > String serialize (T payload ) {
3131 mapper .setSerializationInclusion (JsonInclude .Include .NON_NULL );
Original file line number Diff line number Diff line change 1818
1919import com .fasterxml .jackson .databind .ObjectMapper ;
2020
21- import com .fasterxml .jackson .databind .PropertyNamingStrategy ;
21+ import com .fasterxml .jackson .databind .PropertyNamingStrategies ;
2222import com .optimizely .ab .event .internal .payload .EventBatch ;
2323
2424import org .junit .Test ;
@@ -42,7 +42,7 @@ public class JacksonSerializerTest {
4242 private JacksonSerializer serializer = new JacksonSerializer ();
4343 private ObjectMapper mapper =
4444 new ObjectMapper ().setPropertyNamingStrategy (
45- PropertyNamingStrategy .SNAKE_CASE );
45+ PropertyNamingStrategies .SNAKE_CASE );
4646
4747
4848 @ Test
Original file line number Diff line number Diff line change @@ -4,7 +4,11 @@ dependencies {
44 implementation project(' :core-api' )
55 implementation project(' :core-httpclient-impl' )
66
7- implementation group : ' com.google.code.gson' , name : ' gson' , version : gsonVersion
7+ // implementation group: 'com.google.code.gson', name: 'gson', version: gsonVersion
8+ implementation ' com.fasterxml.jackson.core:jackson-core:2.17.0'
9+ implementation ' com.fasterxml.jackson.core:jackson-annotations:2.17.0'
10+ implementation ' com.fasterxml.jackson.core:jackson-databind:2.17.0'
11+
812 implementation group : ' org.apache.httpcomponents' , name : ' httpclient' , version : httpClientVersion
913 implementation group : ' org.apache.logging.log4j' , name : ' log4j-api' , version : log4jVersion
1014 implementation group : ' org.apache.logging.log4j' , name : ' log4j-core' , version : log4jVersion
You can’t perform that action at this time.
0 commit comments