private byte[] toByteArray(Map<String, String> map) {
			try {
				return writer.writeValueAsBytes(map);
			}
			catch (JsonProcessingException e) {
				throw new RuntimeException(e);
			}
		}
Convert a map of string key/value pairs to a JSON string in a byte array.

@param map map to convert

@return byte array
spring-xd-dirt/src/main/java/org/springframework/xd/dirt/zookeeper/ZooKeeperUtils.java