Package com.fasterxml.jackson.databind.ser

Examples of com.fasterxml.jackson.databind.ser.SerializerFactory


    validateResult();
  }

  @Test
  public void renderWithCustomSerializerLocatedByFactory() throws Exception {
    SerializerFactory factory = new DelegatingSerializerFactory(null);
    XmlMapper mapper = new XmlMapper();
    mapper.setSerializerFactory(factory);
    view.setObjectMapper(mapper);

    Object bean = new TestBeanSimple();
View Full Code Here


    validateResult();
  }

  @Test
  public void renderWithCustomSerializerLocatedByFactory() throws Exception {
    SerializerFactory factory = new DelegatingSerializerFactory(null);
    ObjectMapper mapper = new ObjectMapper();
    mapper.setSerializerFactory(factory);
    view.setObjectMapper(mapper);

    Object bean = new TestBeanSimple();
View Full Code Here

  /**
   * Ensure only bindable and non-cyclic bean properties are reported.
   */
  private void applySerializationModifier(ObjectMapper mapper) {
    SerializerFactory factory = BeanSerializerFactory.instance
        .withSerializerModifier(new GenericSerializerModifier());
    mapper.setSerializerFactory(factory);
  }
View Full Code Here

public class DataSourceJsonSerializationTests {

  @Test
  public void serializerFactory() throws Exception {
    DataSource dataSource = new DataSource();
    SerializerFactory factory = BeanSerializerFactory.instance
        .withSerializerModifier(new GenericSerializerModifier());
    ObjectMapper mapper = new ObjectMapper();
    mapper.setSerializerFactory(factory);
    String value = mapper.writeValueAsString(dataSource);
    assertTrue(value.contains("\"url\":"));
View Full Code Here

TOP

Related Classes of com.fasterxml.jackson.databind.ser.SerializerFactory

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.