INT-4049: FileSplitter: JSON File Markers

JIRA: https://jira.spring.io/browse/INT-4049

INT-4049: Json FileMarker Namespace Support

* Address PR comments
This commit is contained in:
Gary Russell
2016-06-08 13:03:09 -04:00
committed by Artem Bilan
parent c620438913
commit d521031a7d
11 changed files with 172 additions and 28 deletions

View File

@@ -43,6 +43,11 @@ public final class JsonObjectMapperProvider {
super();
}
/**
* Return an object mapper if available.
* @return the mapper.
* @throws IllegalStateException if an implementation is not available.
*/
public static JsonObjectMapper<?, ?> newInstance() {
if (JacksonJsonUtils.isJackson2Present()) {
return new Jackson2JsonObjectMapper();
@@ -55,4 +60,13 @@ public final class JsonObjectMapperProvider {
}
}
/**
* Returns true if a supported JSON implementation is on the class path.
* @return true if {@link #newInstance()} will return a mapper.
* @since 4.2.7
*/
public static boolean jsonAvailable() {
return JacksonJsonUtils.isJackson2Present() || boonPresent;
}
}