code: @SuppressWarnings("unchecked")
  	public <T extends Message> Map<String, Object> writeMessage(final T message,
  			final MessageDescriptor<T> descriptor) {
  		try {
  			return (Map<String, Object>) objectFormat.write(message, descriptor);
  		} catch (Exception e) {
  			throw propagate(e);
  		}
  	}
docs: Converts a message into a JSON-compatible map.