Code example for Gson

0
	 * @param clazz 
	 *            the Class to use. 
	 */ 
	public SpringGsonConverter(Class<T> clazz) {
		this.clazz = clazz;
		this.gson = new Gson();
	} 
 
	public boolean canRead(Class<?> clazz, MediaType arg1) {
		return this.clazz.equals(clazz);
	} 
 
	public boolean canWrite(Class<?> clazz, MediaType arg1) {
		return this.clazz.equals(clazz);
	} 
 
	public List<MediaType> getSupportedMediaTypes() {
		return Arrays.asList(new MediaType[] { MediaType.APPLICATION_JSON });
	}