Maps given {@link JsonTypeAdapter}
into pair of {@link JsonDeserializer} and {@link JsonDeserializer}
and registers them with this.gsonBuilder
771864
public JsonConverterBuilder registerJsonTypeAdapter(JsonTypeAdapter adapter) {
        Validate.argumentIsNotNull(adapter);
        adapter.getValueTypes().forEach( c -> registerJsonTypeAdapterForType((Class)c, adapter));
        return this;
    }
327239
public static GsonBuilder registerLocalDateTime(GsonBuilder builder)
  {
    if (builder == null) { throw new NullPointerException("builder cannot be null"); }

    builder.registerTypeAdapter(LOCAL_DATE_TIME_TYPE, new LocalDateTimeConverter());

    return builder;
  }
205918
public boolean isJsonDeserializer( JType type ) {
        return null != type.isClass() && type.isClass().isAssignableTo( jsonDeserializerType );
    }
628326
public static <T> TreeSetJsonDeserializer<T> newInstance( JsonDeserializer<T> deserializer ) {
        return new TreeSetJsonDeserializer<T>( deserializer );
    }
1226389
public final <T> SerializerJson<T> serializer(Type type)
  {
    SerializerJson<T> ser = (SerializerJson<T>) _serTypeMap.get(type);
    
    if (ser == null) {
      TypeRef typeRef = TypeRef.of(type);
      Class<T> rawClass = (Class<T>) typeRef.rawClass();
      
      ser = serializer(rawClass).withType(typeRef, this);
      
      _serTypeMap.putIfAbsent(type, ser);
      
      ser = (SerializerJson<T>) _serTypeMap.get(type);
    }
    
    return ser;
  }
252998
public static GsonBuilder registerLocalTime(GsonBuilder builder)
  {
    if (builder == null) { throw new NullPointerException("builder cannot be null"); }

    builder.registerTypeAdapter(LOCAL_TIME_TYPE, new LocalTimeConverter());

    return builder;
  }
383450
public static <T> ArrayJsonSerializer<T> newInstance( JsonSerializer<T> serializer ) {
        return new ArrayJsonSerializer<T>( serializer );
    }
886968
private static <T> IntermediateCompatibilityResult<T> getCompatibilityOfPreExistingFields(
			PojoSerializer<T> newPojoSerializer,
			LinkedOptionalMap<Field, TypeSerializerSnapshot<?>> fieldSerializerSnapshots) {

		// the present entries dictates the preexisting fields, because removed fields would be
		// represented as absent keys in the optional map.
		final Set<LinkedOptionalMap.KeyValue<Field, TypeSerializerSnapshot<?>>> presentFieldSnapshots =
			fieldSerializerSnapshots.getPresentEntries();

		final ArrayList<TypeSerializerSnapshot<?>> associatedFieldSerializerSnapshots = new ArrayList<>(presentFieldSnapshots.size());
		final ArrayList<TypeSerializer<?>> associatedNewFieldSerializers = new ArrayList<>(presentFieldSnapshots.size());

		final Map<Field, TypeSerializer<?>> newFieldSerializersIndex = buildNewFieldSerializersIndex(newPojoSerializer);
		for (LinkedOptionalMap.KeyValue<Field, TypeSerializerSnapshot<?>> presentFieldEntry : presentFieldSnapshots) {
			TypeSerializer<?> associatedNewFieldSerializer = newFieldSerializersIndex.get(presentFieldEntry.getKey());
			checkState(
				associatedNewFieldSerializer != null,
				"a present field should have its associated new field serializer available.");

			associatedFieldSerializerSnapshots.add(presentFieldEntry.getValue());
			associatedNewFieldSerializers.add(associatedNewFieldSerializer);
		}

		return CompositeTypeSerializerUtil.constructIntermediateCompatibilityResult(
			associatedNewFieldSerializers.toArray(new TypeSerializer<?>[associatedNewFieldSerializers.size()]),
			associatedFieldSerializerSnapshots.toArray(new TypeSerializerSnapshot<?>[associatedFieldSerializerSnapshots.size()]));
	}
1368803
private static JaxbJsonSerializer<Map<String, String>> getPropsSerializer() {
        return new JaxbJsonSerializer<>((Class<Map<String, String>>) (Object)
            new HashMap<String, String>().getClass());
    }
401676
@SuppressWarnings({ "rawtypes", "unchecked" })
	public <T> void remapField(Class<T> type, String fromJava, String toJson) {
		JsonWriterI map = this.getWrite(type);
		if (!(map instanceof BeansWriterASMRemap)) {
			map = new BeansWriterASMRemap();
			registerWriter(map, type);
		}
		((BeansWriterASMRemap) map).renameField(fromJava, toJson);
	}
1129263
@Override
    public <T> PagedResult<T> deserializeDataWrapper(Class<T> objectClass, java.io.InputStream inputStream) throws JSONSerializerException{
        Util.throwIfNull(objectClass, inputStream);

        PagedResult<T> rw = null;

        try {
            // Read the json input stream into a List.
            rw = OBJECT_MAPPER.readValue(inputStream,
                    OBJECT_MAPPER.getTypeFactory().constructParametrizedType(PagedResult.class, PagedResult.class, objectClass));
        } catch (JsonParseException e) {
            throw new JSONSerializerException(e);
        } catch (JsonMappingException e) {
            throw new JSONSerializerException(e);
        } catch (IOException e) {
            throw new JSONSerializerException(e);
        }

        return rw;
    }
935718
public void bindMappers()
    {
        JacksonXmlModule xmlModule = new JacksonXmlModule();

        xmlModule.setDefaultUseWrapper(false);

        XmlMapper xmlMapper = new XmlMapper(xmlModule);

        xmlMapper.enable(ToXmlGenerator.Feature.WRITE_XML_DECLARATION);

        this.bind(XmlMapper.class).toInstance(xmlMapper);

        ObjectMapper objectMapper = new ObjectMapper();

        objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
        objectMapper.configure(DeserializationFeature.ACCEPT_EMPTY_ARRAY_AS_NULL_OBJECT, true);
        objectMapper.configure(DeserializationFeature.ACCEPT_EMPTY_STRING_AS_NULL_OBJECT, true);
        objectMapper.configure(DeserializationFeature.EAGER_DESERIALIZER_FETCH, true);
        objectMapper.configure(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY, true);
        objectMapper.configure(DeserializationFeature.USE_BIG_DECIMAL_FOR_FLOATS, true);
        objectMapper.registerModule(new AfterburnerModule());
        objectMapper.registerModule(new Jdk8Module());

        this.bind(ObjectMapper.class).toInstance(objectMapper);
        this.requestStaticInjection(Extractors.class);
        this.requestStaticInjection(ServerResponse.class);
    }
135699
public <R, W> JSONer register(Converter<R, W> converter, Class<?>... types) {
        for (Class<?> type : checkNotNull(types)) {
            typeConverts.put(type, checkNotNull(converter));
        }
        return this;
    }
724606
private static <T> PojoSerializerSnapshot<T> buildSnapshot(
			Class<T> pojoType,
			LinkedHashMap<Class<?>, Integer> registeredSubclassesToTags,
			TypeSerializer<?>[] registeredSubclassSerializers,
			Field[] fields,
			TypeSerializer<?>[] fieldSerializers,
			Map<Class<?>, TypeSerializer<?>> nonRegisteredSubclassSerializerCache) {

		final LinkedHashMap<Class<?>, TypeSerializer<?>> subclassRegistry = new LinkedHashMap<>(registeredSubclassesToTags.size());

		for (Map.Entry<Class<?>, Integer> entry : registeredSubclassesToTags.entrySet()) {
			subclassRegistry.put(entry.getKey(), registeredSubclassSerializers[entry.getValue()]);
		}

		return new PojoSerializerSnapshot<>(
				pojoType,
				fields,
				fieldSerializers,
				subclassRegistry,
				nonRegisteredSubclassSerializerCache);
	}
1273980
public static <T> ArrayListJsonDeserializer<T> newInstance( JsonDeserializer<T> deserializer ) {
        return new ArrayListJsonDeserializer<T>( deserializer );
    }
1043493
public static <T extends Comparable<T>> ImmutableSortedSetJsonDeserializer<T> newInstance( JsonDeserializer<T> deserializer ) {
        return new ImmutableSortedSetJsonDeserializer<T>( deserializer );
    }
1118503
public static <T> LinkedListJsonDeserializer<T> newInstance( JsonDeserializer<T> deserializer ) {
        return new LinkedListJsonDeserializer<T>( deserializer );
    }