PageRenderTime 21ms CodeModel.GetById 19ms app.highlight 1ms RepoModel.GetById 0ms app.codeStats 0ms

/examples/api_jsonutil/resources/JsonUtilRepresentation.cfc

http://github.com/atuttle/Taffy
ColdFusion CFScript | 16 lines | 13 code | 3 blank | 0 comment | 0 complexity | 8fb0d5e296f2811b3e1dd4cd9a30dd31 MD5 | raw file
 1<cfcomponent extends="taffy.core.baseRepresentation">
 2
 3	<cffunction
 4		name="getAsJson"
 5		output="false"
 6		taffy:mime="application/json"
 7		taffy:default="true">
 8			<cfreturn variables.jsonUtil.serialize(variables.data) />
 9	</cffunction>
10
11	<cffunction name="setJSONUtil" output="false">
12		<cfargument name="JSONUtil" required="true" />
13		<cfset variables.jsonUtil = arguments.JSONUtil />
14	</cffunction>
15
16</cfcomponent>