Louis,

With regards to your first question, to specific a return format of JSON 
you would do 

remote json function list() { ... }

I see the function is a remote function, so I guess you are accessing this 
from a JavaScript AJAX call? 
If so, remove the return format and return a struct. 

Or the other way would be to route your AJAX call through a CFM page and 
return a struct from your CFC and then set the header with CFHEADER to 
application/json, and just output your data to the page.



On Tuesday, 25 December 2012 20:34:50 UTC, Louis Brauer wrote:
>
> I'm not sure if I understand you correctly. I have a Struct with mixed 
> case key names "firstName", "lastName", "createDate"... when I dump the 
> struct the case is fine, when I output it with a remote call in JSON 
> format, all keys are lowercase.
>
> // In case you want to know why I'm trying OpenBD on christmas day: I use 
> MongoDB and SQS heavily. Your integration of both services into OpenBD is 
> excellent! Saves me hell of a time... :-)
>
> Am Dienstag, 25. Dezember 2012 21:20:34 UTC+1 schrieb Alan Williamson:
>>
>>  what are the case of the keys to begin with?
>>
>> // ps i applaud you playing with OpenBD on Christmas Day!
>>
>> On 25/12/2012 15:17, Louis Brauer wrote:
>>  
>> And I think I found another issue: 
>>
>>  <cffunction name="list" access="remote" output="false" 
>> returnType="array" returnformat="json" *jsoncase="maintain"*>
>>
>> JSON Keys are always returned lowercase, no matter if I declare 
>> jsoncase="maintain" or not.
>>
>>  
>>  

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

Reply via email to