jodd-json/src/main/java/jodd/json/impl/ValueJsonSerializer.java
@Override
	public final boolean serialize(final JsonContext jsonContext, final T value) {
		if (jsonContext.pushValue(value)) {
			// prevent circular dependencies
			return false;
		}

		serializeValue(jsonContext, value);

		jsonContext.popValue();

		return true;
	}
@Override
	public final boolean serialize(final JsonContext jsonContext, final T value) {
		if (jsonContext.pushValue(value)) {
			// prevent circular dependencies
			return false;
		}

		serializeValue(jsonContext, value);

		jsonContext.popValue();

		return true;
	}
Detects circular dependencies and pushes value as current
type context.