/core/nativeJsonRepresentation.cfc

http://github.com/atuttle/Taffy · ColdFusion CFScript · 12 lines · 10 code · 2 blank · 0 comment · 0 complexity · 86a51051e1ced15833615f42750a61c1 MD5 · raw file

  1. <cfcomponent extends="taffy.core.baseRepresentation" output="false" hint="Representation class that uses CFML server's json serialization functionality to return json data">
  2. <cffunction
  3. name="getAsJson"
  4. output="false"
  5. taffy:mime="application/json"
  6. taffy:default="true"
  7. hint="serializes data as JSON">
  8. <cfreturn serializeJSON(variables.data) />
  9. </cffunction>
  10. </cfcomponent>