Use marshaler in place of formatAttributes.