jodd-json/src/main/java/jodd/json/JsonSerializer.java
public JsonSerializer withSerializer(final Class type, final TypeJsonSerializer typeJsonSerializer) {
		if (typeSerializersMap == null) {
			typeSerializersMap = new TypeJsonSerializerMap(TypeJsonSerializerMap.get());
		}

		typeSerializersMap.register(type, typeJsonSerializer);

		return this;
	}
public JsonSerializer withSerializer(final Class type, final TypeJsonSerializer typeJsonSerializer) {
		if (typeSerializersMap == null) {
			typeSerializersMap = new TypeJsonSerializerMap(TypeJsonSerializerMap.get());
		}

		typeSerializersMap.register(type, typeJsonSerializer);

		return this;
	}
Defines custom {@link jodd.json.TypeJsonSerializer} for given type.