code: @SuppressWarnings("unchecked")
  	public static void writeJSONString(Object value, Appendable out, JSONStyle compression) throws IOException {
  		if (value == null) {
  			out.append("null");
  			return;
  		}
  		Class<?> clz = value.getClass();
  		@SuppressWarnings("rawtypes")
  		JsonWriterI w = defaultWriter.getWrite(clz);
  		if (w == null) {
  			if (clz.isArray())
  				w = JsonWriter.arrayWriter;
  			else {
  				w = defaultWriter.getWriterByInterface(value.getClass());
  				if (w == null)
  					w = JsonWriter.beansWriterASM;
  				// w = JsonWriter.beansWriter;
  			}
  			defaultWriter.registerWriter(w, clz);
  		}
  		w.writeJSONString(value, out, compression);
  	}
docs: Encode an object into JSON text and write it to out.
  <p>
  If this object is a Map or a List, and it's also a JSONStreamAware or a
  JSONAware, JSONStreamAware or JSONAware will be considered firstly.
  <p>
  
  @see JSONObject#writeJSON(Map, Appendable)
  @see JSONArray#writeJSONString(List, Appendable)