33
33
import com .fasterxml .jackson .dataformat .ion .IonSymbolSerializer ;
34
34
import com .fasterxml .jackson .dataformat .ion .IonFactory ;
35
35
import com .fasterxml .jackson .dataformat .ion .IonObjectMapper ;
36
- import com .fasterxml .jackson .dataformat .ion .ionvalue .IonValueMapper ;
37
36
38
37
import software .amazon .ion .IonSexp ;
39
38
import software .amazon .ion .IonSystem ;
@@ -182,23 +181,23 @@ public void testPojo3WithOpenContent() throws Exception {
182
181
183
182
@ Test
184
183
public void testPojo4WithSexpInArrayIgnored () throws Exception {
185
- IonObjectMapper mapper = new IonValueMapper (ionSystem );
186
- mapper .disable (DeserializationFeature .FAIL_ON_UNKNOWN_PROPERTIES );
187
-
184
+ IonObjectMapper mapper = IonObjectMapper .builder (ionF )
185
+ .disable (DeserializationFeature .FAIL_ON_UNKNOWN_PROPERTIES )
186
+ .propertyNamingStrategy (PropertyNamingStrategy .SNAKE_CASE )
187
+ .build ();
188
188
String value = "{value:[([])], number:\" Random\" }" ;
189
189
TestPojo4 test = mapper .readValue (ionSystem .singleValue (value ), TestPojo4 .class );
190
190
assertNotNull (test );
191
191
assertNotNull (test .number );
192
192
assertEquals ("Random" , test .number );
193
193
}
194
194
195
- // 16-Feb-2018, tatu: Not 100% sure why it fails after changes to the way Module registration
196
- // occurs (at `jackson-databind`) level
197
- /*
198
195
@ Test
199
196
public void testPojo5WithSexpInArray () throws Exception {
200
- IonObjectMapper mapper = new IonValueMapper(ionSystem);
201
- mapper.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES);
197
+ IonObjectMapper mapper = IonObjectMapper .builder (ionF )
198
+ .disable (DeserializationFeature .FAIL_ON_UNKNOWN_PROPERTIES )
199
+ .propertyNamingStrategy (PropertyNamingStrategy .SNAKE_CASE )
200
+ .build ();
202
201
203
202
String value = "{value:[([blah])], number:\" Random\" }" ;
204
203
TestPojo5 test = mapper .readValue (ionSystem .singleValue (value ), TestPojo5 .class );
@@ -209,7 +208,6 @@ public void testPojo5WithSexpInArray() throws Exception {
209
208
210
209
assertRoundTrip (value , TestPojo5 .class );
211
210
}
212
- */
213
211
214
212
private void assertRoundTrip (String ion , Class <?> clazz ) throws IOException {
215
213
IonValue expected = ionSystem .singleValue (ion );
0 commit comments