JSON.cfc keyCase not respected in nested structs

sorry to keep posting bugs here -- I did head over to the Assembla
repository but wasn't able to post it there (no access)

Anyhow... in Coldbox 3.0 RC2 (from git)

JSON.cfc > encode() has a keyCase argument which is not passed through
to its recursive calls, meaning that nested structs always have
lowercase keys.

encoding this:
<cfset st = {foo={bar=1}}>
<cfoutput>#JSON.encode(data=st, keyCase="upper")#</cfoutput>

would result in
{FOO:{bar:1}} instead of {FOO:{BAR:1}}

eg:
<cfset tempVal = encode( _data[i], arguments.queryFormat,
arguments.queryKeyCase, arguments.stringNumbers,
arguments.formatDates, arguments.columnListFormat) />

should be

<cfset tempVal = encode( _data[i], arguments.queryFormat,
arguments.queryKeyCase, arguments.stringNumbers,
arguments.formatDates, arguments.columnListFormat,
arguments.keyCase ) />

there are 4 occurrences on lines 306,334,397,420

cheers
CC

Awesome. A git fork of this and pull request would be great. Also I am evaluating the issues from github and then they will be moved to assemble and assigned. This way github is a triage of issues so assemble tickets don't get polluted with discussions.

I'm new to Git so while I *think* I did the right thing with the fork/
pull request, I may just as easily have buggered it up :slight_smile:

On the off chance it's at all useful I posted the amended JSON.cfc to
pastebin:
http://pastebin.ca/2006578

it was great, already pulled it, tested it and re-committed. Awesome. Man, this is so great to collaborate like this!!

Big Kudos!!

Luis F. Majano
President
Ortus Solutions, Corp

ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Blog: http://www.luismajano.com
IECFUG Manager: http://www.iecfug.com