Code example for JsonPrimitive

0
 
	@Override 
	public JsonElement serialize(byte[] src, Type typeOfSrc, 
			JsonSerializationContext context) { 
		byte[] l2 = Base64.encodeBase64(src); 
		return new JsonPrimitive(new String(l2)); 
	} 
 
}