Package com.fasterxml.jackson.databind

Examples of com.fasterxml.jackson.databind.PropertyNamingStrategy


    return ((BasicDeserializerFactory) objectMapper.getDeserializationContext().getFactory()).getFactoryConfig();
  }

  @Test
  public void propertyNamingStrategy() {
    PropertyNamingStrategy strategy = new PropertyNamingStrategy.LowerCaseWithUnderscoresStrategy();
    this.factory.setPropertyNamingStrategy(strategy);
    this.factory.afterPropertiesSet();

    assertSame(strategy, this.factory.getObject().getSerializationConfig().getPropertyNamingStrategy());
    assertSame(strategy, this.factory.getObject().getDeserializationConfig().getPropertyNamingStrategy());
View Full Code Here


    return ((BasicDeserializerFactory) objectMapper.getDeserializationContext().getFactory()).getFactoryConfig();
  }

  @Test
  public void propertyNamingStrategy() {
    PropertyNamingStrategy strategy = new PropertyNamingStrategy.LowerCaseWithUnderscoresStrategy();
    ObjectMapper objectMapper = Jackson2ObjectMapperBuilder.json().propertyNamingStrategy(strategy).build();
    assertSame(strategy, objectMapper.getSerializationConfig().getPropertyNamingStrategy());
    assertSame(strategy, objectMapper.getDeserializationConfig().getPropertyNamingStrategy());
  }
View Full Code Here

TOP

Related Classes of com.fasterxml.jackson.databind.PropertyNamingStrategy

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.