Code example for Gson

Methods: toJson

0
					sb.append("{} && ");
				} 
 
				if (typeOfSrc != null)
				{ 
					sb.append(gson.toJson(o, typeOfSrc));
				} 
				else 
				{ 
					sb.append(gson.toJson(o));
				} 
 
				LOG.debug("Json response:\n" + sb.toString());
				writer.write(sb.toString());
			} 
			else 
			{ 
				if (this.prefixJson)
				{ 
					writer.append("{} && ");