List of usage examples for com.fasterxml.jackson.databind PropertyNamingStrategy PASCAL_CASE_TO_CAMEL_CASE
PropertyNamingStrategy PASCAL_CASE_TO_CAMEL_CASE
To view the source code for com.fasterxml.jackson.databind PropertyNamingStrategy PASCAL_CASE_TO_CAMEL_CASE.
Click Source Link
From source file:com.kurtraschke.wmata.gtfsrealtime.services.WMATAAPIService.java
@PostConstruct public void start() { _jsonMapper = new ObjectMapper(); _jsonMapper.setPropertyNamingStrategy(PropertyNamingStrategy.PASCAL_CASE_TO_CAMEL_CASE); _xmlMapper = new XmlMapper(); _connectionManager = new BasicHttpClientConnectionManager(); _limiter = RateLimiter.create(_apiRateLimit); if (_apiRateLimit > 9) { _log.warn("API rate limit set to {}, greater than default rate limit of 9 queries/second"); }/*from w w w . j a v a2 s . co m*/ }
From source file:org.springframework.data.rest.webmvc.json.DomainObjectReaderUnitTests.java
/** * @see DATAREST-556//w w w .j a va 2 s. c om */ @Test public void considersMappedFieldNamesWhenApplyingNodeToDomainObject() throws Exception { ObjectMapper mapper = new ObjectMapper(); mapper.setPropertyNamingStrategy(PropertyNamingStrategy.PASCAL_CASE_TO_CAMEL_CASE); JsonNode node = new ObjectMapper().readTree("{\"FirstName\":\"Carter\",\"LastName\":\"Beauford\"}"); Person result = reader.readPut((ObjectNode) node, new Person("Dave", "Matthews"), mapper); assertThat(result.firstName, is("Carter")); assertThat(result.lastName, is("Beauford")); }