@POST
	@Path("/createEvent")
	@Consumes(MediaType.APPLICATION_JSON)
	@Produces(MediaType.APPLICATION_JSON)
	public Response createEvent(String jsonObject) {
		Gson gson = new GsonBuilder().setDateFormat(WS_DATE_PATTERN).create();

		Event event = null;
		try {
			event = gson.fromJson(jsonObject, Event.class);
		} catch (JsonSyntaxException e1) {
			try{
				gson = new GsonBuilder().setDateFormat(JS_DATE_FORMAT).create();
				event = gson.fromJson(jsonObject, Event.class);
			}catch (JsonSyntaxException e){
				e.printStackTrace();
				return makeCORS(Response.status(400));
			}
		}

		EventMongoDAO mc = null;
		try {
			mc = EventMongoDAO.getInstance();

		} catch (UnknownHostException e) {
			e.printStackTrace();
			return makeCORS(Response.status(503));
		}
		if (event.getId() != null && mc.exists(event.getId())) {
			return makeCORS(Response.status(400));
		} else {
			Event ev = mc.create(event);
			String toReturn = gson.toJson(ev);
			return makeCORS(Response.ok().entity(toReturn));
		}
	}