jodd-json/src/main/java/jodd/json/JsonContext.java
public boolean serialize(final Object object) {
		if (object == null) {
			write(NULL);

			return true;
		}

		TypeJsonSerializer typeJsonSerializer = null;

		// callback

		if (serializerResolver != null) {
			typeJsonSerializer = serializerResolver.apply(object);
		}

		if (typeJsonSerializer == null) {

			// + read paths map

			if (jsonSerializer.pathSerializersMap != null) {
				typeJsonSerializer = jsonSerializer.pathSerializersMap.get(path);
			}

			final Class type = object.getClass();

			// + read local types map

			if (jsonSerializer.typeSerializersMap != null) {
				typeJsonSerializer = jsonSerializer.typeSerializersMap.lookup(type);
			}

			// + globals

			if (typeJsonSerializer == null) {
				typeJsonSerializer = TypeJsonSerializerMap.get().lookup(type);
			}
		}

		return typeJsonSerializer.serialize(this, object);
	}
public boolean serialize(final Object object) {
		if (object == null) {
			write(NULL);

			return true;
		}

		TypeJsonSerializer typeJsonSerializer = null;

		// callback

		if (serializerResolver != null) {
			typeJsonSerializer = serializerResolver.apply(object);
		}

		if (typeJsonSerializer == null) {

			// + read paths map

			if (jsonSerializer.pathSerializersMap != null) {
				typeJsonSerializer = jsonSerializer.pathSerializersMap.get(path);
			}

			final Class type = object.getClass();

			// + read local types map

			if (jsonSerializer.typeSerializersMap != null) {
				typeJsonSerializer = jsonSerializer.typeSerializersMap.lookup(type);
			}

			// + globals

			if (typeJsonSerializer == null) {
				typeJsonSerializer = TypeJsonSerializerMap.get().lookup(type);
			}
		}

		return typeJsonSerializer.serialize(this, object);
	}
Serializes the object using {@link jodd.json.TypeJsonSerializer type serializer}.
Returns <code>true</code> if object was written, otherwise returns <code>false</code>.