Examples of withType()


Examples of com.facebook.presto.jdbc.internal.jackson.databind.deser.DataFormatReaders.withType()

        }
        JsonDeserializer<Object> rootDeser = _prefetchRootDeserializer(_config, valueType);
        // type is stored here, no need to make a copy of config
        DataFormatReaders det = _dataFormatReaders;
        if (det != null) {
            det = det.withType(valueType);
        }
        return new ObjectReader(this, _config, valueType, rootDeser,
                _valueToUpdate, _schema, _injectableValues, det);
    }   
View Full Code Here

Examples of com.facebook.presto.jdbc.internal.jackson.databind.deser.DataFormatReaders.withType()

        }
        JsonDeserializer<Object> rootDeser = _prefetchRootDeserializer(_config, valueType);
        // type is stored here, no need to make a copy of config
        DataFormatReaders det = _dataFormatReaders;
        if (det != null) {
            det = det.withType(valueType);
        }
        return new ObjectReader(this, _config, valueType, rootDeser,
                _valueToUpdate, _schema, _injectableValues, det);
    }   
View Full Code Here

Examples of com.fasterxml.jackson.databind.ObjectReader.withType()

      }
      // [Issue#1]: allow 'binding' to JsonParser
      if (((Class<?>) type) == JsonParser.class) {
         return jp;
      }
      return reader.withType(genericType).readValue(jp);
   }

   protected final ConcurrentHashMap<ClassAnnotationKey, JsonEndpointConfig> _writers
           = new ConcurrentHashMap<ClassAnnotationKey, JsonEndpointConfig>();
View Full Code Here

Examples of com.fasterxml.jackson.databind.ObjectReader.withType()

    if (recordClass == null) {
      throw new JsonDeserializationException(
                    JsonDeserializationExceptionCode.unknownResourceRecordType,
          recordType);
    }
    return reader.withType(recordClass).readValue(recordNode.toString());
  }
}
View Full Code Here

Examples of com.fasterxml.jackson.databind.ObjectReader.withType()

    if (recordClass == null) {
      throw new JsonDeserializationException(
                    JsonDeserializationExceptionCode.unknownResourceRecordType,
          recordType);
    }
    return reader.withType(recordClass).readValue(recordNode.toString());
  }
}
View Full Code Here

Examples of com.fasterxml.jackson.databind.ObjectReader.withType()

    if (recordClass == null) {
      throw new JsonDeserializationException(
                    JsonDeserializationExceptionCode.unknownResourceRecordType,
          recordType);
    }
    return reader.withType(recordClass).readValue(recordNode.toString());
  }
}
View Full Code Here

Examples of com.fasterxml.jackson.databind.ObjectWriter.withType()

         }

         // Most of the configuration now handled through EndpointConfig, ObjectWriter
         // but we may need to force root type:
         if (rootType != null) {
            writer = writer.withType(rootType);
         }
         value = endpoint.modifyBeforeWrite(value);
         writer.writeValue(jg, value);
      } finally {
         jg.close();
View Full Code Here

Examples of com.fasterxml.jackson.databind.ObjectWriter.withType()

                     * if we set it for regular types, jackson will build the serializer based on this type, and not the
                     * instance type, making polymorphic returns broken.
                     * For parameterized types it helps Jackson which otherwise tries to guess the serializer based on
                     * value.getClass() which doesn't return type parameters information due to Java erasure.
                     */
                    writer = writer.withType(TypeFactory.defaultInstance().constructType(valueType));
                }
                return Optional.of(JsonEntityResponseWriter.<T>using(valueType, writer));
            }
        };
    }
View Full Code Here

Examples of com.fasterxml.jackson.databind.deser.DataFormatReaders.withType()

        }
        JsonDeserializer<Object> rootDeser = _prefetchRootDeserializer(_config, valueType);
        // type is stored here, no need to make a copy of config
        DataFormatReaders det = _dataFormatReaders;
        if (det != null) {
            det = det.withType(valueType);
        }
        return _new(this, _config, valueType, rootDeser,
                _valueToUpdate, _schema, _injectableValues, det);
    }   
View Full Code Here

Examples of com.fasterxml.jackson.databind.deser.DataFormatReaders.withType()

        }
        JsonDeserializer<Object> rootDeser = _prefetchRootDeserializer(_config, valueType);
        // type is stored here, no need to make a copy of config
        DataFormatReaders det = _dataFormatReaders;
        if (det != null) {
            det = det.withType(valueType);
        }
        return new ObjectReader(this, _config, valueType, rootDeser,
                _valueToUpdate, _schema, _injectableValues, det);
    }   
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.