Alan, thank you very much. I had no idea.

Charlie

Sent from my iPhone

On Apr 25, 2013, at 11:32 AM, Alan Williamson <[email protected]> wrote:

> In short, this is a backward compatibility with OpenBD.  You can change this 
> using:
> 
> http://openbd.org/manual/?/engine_bluedragonxml#jsoncase
> 
> or by specifying how the case in CFFUNCTION
> 
> http://openbd.org/manual/?/tag/CFFUNCTION
> 
> On 25/04/2013 13:15, Skellington wrote:
>> Hello,
>> So this might not effect everyone but it does me. I'm using OpenBD for 
>> creating web services and consuming them on My Mac OS X applications which 
>> I'm writing in Objective-C. If I create a cffunction and set it's returnType 
>> to "json" and return a query result, the field "columns" and "data" are in 
>> lower case. Now if I take a struct attribute and set it's value to 
>> serializeJSON(myQuery) the query fields of columns and data are uppercase.
>> 
>> Example ...
>> 
>> <cffunction name="GetData" access="remote" returnType="struct" 
>> returnFormat="json" output="false">
>> 
>>  <cfset response = {} />
>>  <cfset response[ "errorNo" ] = "0" />
>>  <cfset response[ "errorMsg" ] = "" />
>>  <cfset response[ "resultPlain" ] = {} />
>>  <cfset response[ "resultJSON" ] = {} />
>>  
>>  <cfquery name="qGet" datasource="myds">
>>  SELECT * FROM myTable
>>  </cfquery>
>>  
>>  <cfset response[ "resultPlain" ] = qGet /> <!--- lower case columns and 
>> data --->
>>  <cfset response[ "resultJSON" ] = serializeJSON(qGet) /> <!--- upper case 
>> columns and data --->
>> 
>> 
>> Can some one please explain why "serializeJSON" make them upper case and 
>> "returnFormat=json" make them lower case?
>> 
>> Oh, yea ... the double serialization was due to bad data most of which has 
>> been taken care but still exists in some cases.
>> 
>> Thanks,
>> Charlie
>> -- 
>> -- 
>> online documentation: http://openbd.org/manual/
>> http://groups.google.com/group/openbd?hl=en
>>  
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "Open BlueDragon" 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/groups/opt_out.
> 
> -- 
> -- 
> online documentation: http://openbd.org/manual/
> http://groups.google.com/group/openbd?hl=en
>  
> --- 
> You received this message because you are subscribed to the Google Groups 
> "Open BlueDragon" 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/groups/opt_out.
>  
>  

-- 
-- 
online documentation: http://openbd.org/manual/
 http://groups.google.com/group/openbd?hl=en

--- 
You received this message because you are subscribed to the Google Groups "Open 
BlueDragon" 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/groups/opt_out.


Reply via email to