Shorthand format for Custom Renderer

I have a custom Renderer (arrayCollection.cfc) that I am trying to use as part of my REST API.

event.renderData( data=qUsers, formats=“json,xml,text” );

Is there a shorthand syntax method for including this custom format like this?

event.renderData( data=qUsers, formats=“json,xml,text,MyCUSTOM” );

or what is the best method to perform this via ColdBox?

I don’t think so.

The formats was added as a shortcut way to tell ColdBox, hey, build the code for me in all these formats. If the format is not in the accepted case it is ignored. Not sure how we could do a custom one, ideas? Look at the code in the request context: renderWithFormats()

Luis Majano
Ortus Solutions, Corp
P/F: 1-888-557-8057
Direct: (909) 248-3408

ColdBox Platform:

ContentBox Platform:
Linked In:

Social: | | |

Not sure how we could do a custom one, ideas?

Something like…

if ( isCustomFormatter(instance.context.format) )
arguments.type = instance.context.format;

return getCustomFormatter(instance.context.format).renderData( argumentcollection=arguments );