@SuppressWarnings("rawtypes")
	public final static Farmacia jsonToFarmacia(String json) throws ParseException {
		Farmacia farm = new Farmacia();
		JSONParser parser = new JSONParser();
		ContainerFactory containerFactory = new ContainerFactory() {
			public List<String> creatArrayContainer() {
				return new LinkedList<String>();
			}

			public Map<String, String> createObjectContainer() {
				return new LinkedHashMap<String, String>();
			}

		};

		Map map = (Map) parser.parse(json, containerFactory);
		Iterator iterator = map.entrySet().iterator();
		while (iterator.hasNext()) {
			Map.Entry entry = (Map.Entry) iterator.next();
			if (entry.getKey().equals("id"))
				farm.setId(Long.parseLong(entry.getValue().toString()));
				else if (entry.getKey().equals("name")) {
				farm.setName(entry.getValue().toString());
				System.out.println(entry.getValue().toString());
			} else if (entry.getKey().equals("ciudad"))
				farm.setciudad(entry.getValue().toString());
			else if (entry.getKey().equals("direccion"))
				farm.setdireccion(entry.getValue().toString());
			else if (entry.getKey().equals("longitud"))
				farm.setlongitud(entry.getValue().toString());	
			else if (entry.getKey().equals("latitud"))
				farm.setlatitud(entry.getValue().toString());
			else if (entry.getKey().equals("horario"))
				farm.sethorario(entry.getValue().toString());
			else if (entry.getKey().equals("id_admin"))
				farm.setIdtipo(Long.parseLong(entry.getValue().toString()));

			

		}
		return farm;
	}