code: public static String quote(String string) {
  		if (string == null || string.length() == 0) {
  			return "\"\"";
  		}
  		int len = string.length();
  		StringBuilder sb = new StringBuilder(len + 4);
  
  		sb.append('"');
  		sb.append(escape(string));
  		sb.append('"');
  		return sb.toString();
  	}
docs: From JSONObject.java, from which the copyright notice is the following:
  
  Copyright (c) 2002 JSON.org Permission is hereby granted, free of charge,
  to any person obtaining a copy of this software and associated
  documentation files (the "Software"), to deal in the Software without
  restriction, including without limitation the rights to use, copy,
  modify, merge, publish, distribute, sublicense, and/or sell copies of the
  Software, and to permit persons to whom the Software is furnished to do
  so, subject to the following conditions:
  
  
  The above copyright notice and this permission notice shall be included
  in all copies or substantial portions of the Software.
  
  Produce a string in double quotes with backslash sequences in all the
  right places. A backslash will be inserted within </, allowing JSON text
  to be delivered in HTML. In JSON text, a string cannot contain a control
  character or an unescaped quote or backslash.
  
  @param string
  A String
  @return A String correctly formatted for insertion in a JSON text.