Trouble is, he needs to dump in the entire arguments scope, regardless of
what's in it (going by the example code). This should do the trick:

<cfset var arg = "" />
...
...
<cfloop collection="#arguments#" item="arg">
 <cfset retStruct['output'][LCase(arg)] = arguments[arg] />
</cfloop>

HTH,

Dom

2009/11/26 Kevan Stannard <ke...@stannard.net.au>

>
> The struct key name case should be retained with the following syntax:
>
> <cfset retStruct["success"] = "1">
>
>
>
> 2009/11/26 Bryan Stevenson <br...@electricedgesystems.com>
>
> >
> > Hey All,
> >
> > I just bumped into an interesting/annoying potential difference between
> > Adobe CF 8 and OpenBD.
> >
> > When I run the following code in a CFFUNCTION:
> >
> > <!--- define the structure--->
> > <cfset var retStruct = StructNew()>
> >
> > <cfset structInsert(retStruct, "success", "1")>
> > <cfset structInsert(retStruct, "output", #ARGUMENTS#)>
> > <cfset structInsert(retStruct, "exception", "")>
> >
> > I get the following results:
> >
> > OpenBD: each ARGUMENT key is lowercase (along with values)
> >
> > Adobe CF 8: each ARGUMENT key is uppercase (along with values)
> >
> > This is a royal PITA for JS that uses the retStruct (json serialized BTW
> > by ajaxCFC and not serializeJSON()).  All my JS code is lowercase.
> >
> > Anyways.....I'm sure there is a simple solution to force lowercase
> > ARGUMENT scope structure keys, but I'm a few days into a nasty head cold
> > and the noodle isn't multi-tasking right now ;-)
> >
> > TIA
> >
> > Cheers
> >
> > --
> >
> > Bryan Stevenson B.Comm.
> > VP & Director of E-Commerce Development
> > Electric Edge Systems Group Inc.
> > phone: 250.480.0642
> > fax: 250.480.1264
> > cell: 250.920.8830
> > e-mail: br...@electricedgesystems.com
> > web: www.electricedgesystems.com
> >
> > Notice:
> > This message, including any attachments, is confidential and may contain
> > information that is privileged or exempt from disclosure. It is intended
> > only for the person to whom it is addressed unless expressly authorized
> > otherwise by the sender. If you are not an authorized recipient, please
> > notify the sender immediately and permanently destroy all copies of this
> > message and attachments.
> >
> >
> >
> >
> >
> >
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:328726
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to