Examples of constructCollectionType()


Examples of com.facebook.presto.jdbc.internal.jackson.databind.type.TypeFactory.constructCollectionType()

    {
        JavaType obType = ctxt.constructType(Object.class);
        JavaType stringType = ctxt.constructType(String.class);
        TypeFactory tf = ctxt.getTypeFactory();
        _mapDeserializer = _findCustomDeser(ctxt, tf.constructMapType(Map.class, stringType, obType));
        _listDeserializer = _findCustomDeser(ctxt, tf.constructCollectionType(List.class, obType));
        _stringDeserializer = _findCustomDeser(ctxt, stringType);
        _numberDeserializer = _findCustomDeser(ctxt, tf.constructType(Number.class));
    }

    @SuppressWarnings("unchecked")
View Full Code Here

Examples of com.fasterxml.jackson.databind.type.TypeFactory.constructCollectionType()

    TypeFactory typeFactory = TypeFactory.defaultInstance();
   
    if (object instanceof List && !((List<?>) object).isEmpty()) {
      List<?> list = (List<?>) object;
      Object firstElement = list.get(0);
      return typeFactory.constructCollectionType(list.getClass(), constructType(firstElement));

    } else {
      return typeFactory.constructType(object.getClass());
    }
  }
View Full Code Here

Examples of com.fasterxml.jackson.databind.type.TypeFactory.constructCollectionType()

    {
        JavaType obType = ctxt.constructType(Object.class);
        JavaType stringType = ctxt.constructType(String.class);
        TypeFactory tf = ctxt.getTypeFactory();
        _mapDeserializer = _findCustomDeser(ctxt, tf.constructMapType(Map.class, stringType, obType));
        _listDeserializer = _findCustomDeser(ctxt, tf.constructCollectionType(List.class, obType));
        _stringDeserializer = _findCustomDeser(ctxt, stringType);
        _numberDeserializer = _findCustomDeser(ctxt, tf.constructType(Number.class));
    }

    @SuppressWarnings("unchecked")
View Full Code Here

Examples of com.fasterxml.jackson.databind.type.TypeFactory.constructCollectionType()

        sortedLinks.put("curies", curies);
      }

      TypeFactory typeFactory = provider.getConfig().getTypeFactory();
      JavaType keyType = typeFactory.uncheckedSimpleType(String.class);
      JavaType valueType = typeFactory.constructCollectionType(ArrayList.class, Object.class);
      JavaType mapType = typeFactory.constructMapType(HashMap.class, keyType, valueType);

      MapSerializer serializer = MapSerializer.construct(new String[] {}, mapType, true, null,
          provider.findKeySerializer(keyType, null), new OptionalListJackson2Serializer(property), null);
View Full Code Here

Examples of com.fasterxml.jackson.databind.type.TypeFactory.constructCollectionType()

    {
        JavaType obType = ctxt.constructType(Object.class);
        JavaType stringType = ctxt.constructType(String.class);
        TypeFactory tf = ctxt.getTypeFactory();
        _mapDeserializer = _findCustomDeser(ctxt, tf.constructMapType(Map.class, stringType, obType));
        _listDeserializer = _findCustomDeser(ctxt, tf.constructCollectionType(List.class, obType));
        _stringDeserializer = _findCustomDeser(ctxt, stringType);
        _numberDeserializer = _findCustomDeser(ctxt, tf.constructType(Number.class));
    }

    @SuppressWarnings("unchecked")
View Full Code Here

Examples of com.fasterxml.jackson.databind.type.TypeFactory.constructCollectionType()

    {
        JavaType obType = ctxt.constructType(Object.class);
        JavaType stringType = ctxt.constructType(String.class);
        TypeFactory tf = ctxt.getTypeFactory();
        _mapDeserializer = _findCustomDeser(ctxt, tf.constructMapType(Map.class, stringType, obType));
        _listDeserializer = _findCustomDeser(ctxt, tf.constructCollectionType(List.class, obType));
        _stringDeserializer = _findCustomDeser(ctxt, stringType);
        _numberDeserializer = _findCustomDeser(ctxt, tf.constructType(Number.class));
    }

    @SuppressWarnings("unchecked")
View Full Code Here

Examples of org.codehaus.jackson.map.type.TypeFactory.constructCollectionType()

        List<ZencoderJobDetailResponse> jobs = null;
        try {
            TypeFactory typeFactory = TypeFactory.defaultInstance();
            jobs = mapper.readValue(
                    response.getBody(),
                    typeFactory.constructCollectionType(List.class, ZencoderJobDetailResponse.class));

        } catch (Exception e) {
            throw new ZencoderClientException(
                    "Unable to deserialize ZencoderCreateJobResponse as JSON",
                    e);
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.