Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public void testLookAhead() {
// Unknown field 'baz' (JSON path: properties['foo-bar'].baz) (...line no=1, column no=36, offset=35)

JsonpMappingException e = assertThrows(JsonpMappingException.class, () -> {
fromJson(json, TypeMapping.class);
fromJson(json, TypeMapping.class, SimpleJsonpMapper.INSTANCE_REJECT_UNKNOWN_FIELDS);
});

// Check escaping of non identifier path elements and path from map elements
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,25 +58,15 @@ private static JsonpMapper createMapper(JsonImpl jsonImpl, int rand) {
switch(jsonImpl) {
case Jsonb:
System.out.println("Using a JsonB mapper (rand = " + rand + ").");
return new JsonbJsonpMapper() {
@Override
public boolean ignoreUnknownFields() {
return false;
}
};
return new JsonbJsonpMapper();

case Jackson:
System.out.println("Using a Jackson mapper (rand = " + rand + ").");
return new JacksonJsonpMapper() {
@Override
public boolean ignoreUnknownFields() {
return false;
}
};
return new JacksonJsonpMapper();

default:
System.out.println("Using a simple mapper (rand = " + rand + ").");
return SimpleJsonpMapper.INSTANCE_REJECT_UNKNOWN_FIELDS;
return SimpleJsonpMapper.INSTANCE;
}
}

Expand Down