Examples of canSerialize()


Examples of com.fasterxml.jackson.databind.ObjectMapper.canSerialize()

   
        Simple s = new Simple();
        s.setList(l);

        // this is fine:
        boolean can = mapper.canSerialize(Simple.class);
        assertTrue(can);

        // but with problem of [JACKSON-540], we get nasty surprise here...
        String json = mapper.writeValueAsString(s);
       
View Full Code Here

Examples of com.fasterxml.jackson.databind.ObjectMapper.canSerialize()

   
        Simple s = new Simple();
        s.setList(l);

        // this is fine:
        boolean can = mapper.canSerialize(Simple.class);
        assertTrue(can);

        // but with problem of [JACKSON-540], we get nasty surprise here...
        String json = mapper.writeValueAsString(s);
       
View Full Code Here

Examples of com.fasterxml.jackson.databind.ObjectMapper.canSerialize()

  @Test
  public void registersJodaModuleAutomatically() {
    this.context.register(JacksonAutoConfiguration.class);
    this.context.refresh();
    ObjectMapper objectMapper = this.context.getBean(ObjectMapper.class);
    assertThat(objectMapper.canSerialize(LocalDateTime.class), is(true));
  }

  @Test
  public void customJacksonModules() throws Exception {
    this.context.register(ModulesConfig.class, JacksonAutoConfiguration.class);
View Full Code Here

Examples of org.sf.bee.commons.remoting.jrpc.serializer.ISerializer.canSerialize()

                        jsoClazz == null ? "null" : jsoClazz.getName()});
        }

        synchronized (_serializerSet) {
            ISerializer s = (ISerializer) _serializableMap.get(clazz);
            if (s != null && s.canSerialize(clazz, jsoClazz)) {
                if (logger.isLoggable(Level.FINE)) {
                    logger.log(Level.FINE, "direct match serializer {0}",
                            s.getClass().getName());
                }
                return s;
View Full Code Here

Examples of org.sf.bee.commons.remoting.jrpc.serializer.ISerializer.canSerialize()

                return s;
            }
            final Iterator i = _serializerList.iterator();
            while (i.hasNext()) {
                s = (ISerializer) i.next();
                if (s.canSerialize(clazz, jsoClazz)) {
                    if (logger.isLoggable(Level.FINE)) {
                        logger.log(Level.FINE, "search found serializer {0}",
                                s.getClass().getName());
                    }
                    return s;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.