code: public <T> Object writeObject(final T object, final DataTypeDescriptor<T> descriptor) {
  		try {
  			return objectFormat.write(object, descriptor);
  		} catch (Exception e) {
  			throw propagate(e);
  		}
  	}
docs: Converts an object into a JSON-compatible object.