/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
- <cfcomponent extends="taffy.core.baseRepresentation">
- <cffunction
- name="getAsJson"
- output="false"
- taffy:mime="application/json"
- taffy:default="true">
- <cfreturn variables.jsonUtil.serialize(variables.data) />
- </cffunction>
- <cffunction name="setJSONUtil" output="false">
- <cfargument name="JSONUtil" required="true" />
- <cfset variables.jsonUtil = arguments.JSONUtil />
- </cffunction>
- </cfcomponent>