List of usage examples for org.springframework.boot.json JsonParserFactory getJsonParser
public static JsonParser getJsonParser()
From source file:org.springframework.boot.env.SpringApplicationJsonEnvironmentPostProcessor.java
private void processJson(ConfigurableEnvironment environment, String json) { try {// w w w . j a v a 2 s. c o m JsonParser parser = JsonParserFactory.getJsonParser(); Map<String, Object> map = parser.parseMap(json); if (!map.isEmpty()) { addJsonPropertySource(environment, new MapPropertySource("spring.application.json", flatten(map))); } } catch (Exception ex) { logger.warn("Cannot parse JSON for spring.application.json: " + json, ex); } }