public void encodeNullToNull(Writer writer, T obj) throws IOException {
		if (obj == null) {
			writer.write("null");
			return;
		}

		JsonUtil.startHash(writer);

		encodeValue(writer, obj);

		JsonUtil.endHash(writer);

		writer.flush();
	}
public void encodeNullToNull ( Writer writer , T obj ) throws IOException { if ( obj == null ) { writer . write ( "null" ) ; return ; } JsonUtil . startHash ( writer ) ; encodeValue ( writer , obj ) ; JsonUtil . endHash ( writer ) ; writer . flush ( ) ; }
Encodes the given value into the JSON format, and writes it using the given writer.<br>
Writes "null" if null is given.

@param writer {@link Writer} to be used for writing value
@param obj Value to encoded
@throws IOException