Support wildcard style media types in JSON converters

Add "application/*+json" to supported media types for both Jackson
message converters.

Issue: SPR-7905
This commit is contained in:
Tim Meighen
2012-08-29 13:46:23 -07:00
committed by Rossen Stoyanchev
parent 2e1a68893d
commit e16c40359a
3 changed files with 10 additions and 3 deletions

View File

@@ -45,7 +45,6 @@ public abstract class AbstractMappingJacksonHttpMessageConverterTests<T extends
protected static final String NEWLINE_SYSTEM_PROPERTY = System.getProperty("line.separator");
private T converter;
@Before
@@ -71,6 +70,14 @@ public abstract class AbstractMappingJacksonHttpMessageConverterTests<T extends
assertTrue(converter.canWrite(Map.class, new MediaType("application", "json")));
}
// SPR-7905
@Test
public void canReadAndWriteMicroformats() {
assertTrue(converter.canRead(MyBean.class, new MediaType("application", "vnd.test-micro-type+json")));
assertTrue(converter.canWrite(MyBean.class, new MediaType("application", "vnd.test-micro-type+json")));
}
@Test
public void readTyped() throws IOException {
String body =