So I have a component for which I want it to return the value in JSON 
format:

   <!--- Get all grades TEST --->
    <cffunction name="testQuery" access="remote" returntype="query" 
returnformat="JSON" output="false">
        <cfset var qTestRet="">
        <cfquery datasource="#APPLICATION.dsn#" name="qTestRet" >
            SELECT [gradeId]
                  ,[description]
              FROM [dbo].[grades]
        </cfquery>
        
      <cfreturn qTestRet>
    </cffunction>

It is converting the value to JSON but for some reason it is adding a 
COLUMNS and DATA values to my JSON and therefore I can't parse it 
correctly. Am I missing anything or is this the way ColdFusion creates a 
JSON out of a query?

This is the output:

json_query={"COLUMNS":["GRADEID","DESCRIPTION"],"DATA":[["1","Demuestra 
dominio de la habilidad/concepto, con ayuda directa"],["2","Demuestra 
dominio de la habilidad/concepto, con el minimo de auda"],["3","Demuestra 
dominio de la habilidad/concepto"],["4","Entiende el concepto/habilidad 
arriba del nivel de las expectativas de su grado"],["N/A","Aun no 
evaluado"]]}

-- 
-- 
You received this message because you are subscribed to the "Houston ColdFusion 
Users' Group" discussion list.
To unsubscribe, send email to [email protected]
For more options, visit http://groups.google.com/group/houcfug?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Houston ColdFusion Users' Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to