src/main/java/js/http/encoder/ServerEncoders.java
@Override
	public ContentType getContentTypeForValue(Object value) {
		if (value instanceof Document) {
			return ContentType.TEXT_XML;
		}
		if (value instanceof StreamHandler) {
			return ContentType.APPLICATION_STREAM;
		}
		return ContentType.APPLICATION_JSON;
	}
@Override
	public ContentType getContentTypeForValue(Object value) {
		if (value instanceof Document) {
			return ContentType.TEXT_XML;
		}
		if (value instanceof StreamHandler) {
			return ContentType.APPLICATION_STREAM;
		}
		return ContentType.APPLICATION_JSON;
	}
Determine content type usable to retrieve a writer able to handle given object value. This method is used in tandem with
{@link #getValueWriter(ContentType)}.
<p>
There is a heuristic to determine content type based on object value class. If no suitable content type found returns
{@link ContentType#APPLICATION_JSON}.

@param value object value.
@return content type for given object value.