tracker issue : CF-3712134

select a category, or use search below
(searches all categories and all time range)
Title:

Change this.serialization.preservecaseforstructkey

| View in Tracker

Status/Resolution/Reason: Closed/Withdrawn/AsDesigned

Reporter/Name(from Bugbase): Adam Cameron / Adam Cameron (Adam Cameron)

Created: 02/22/2014

Components: Language

Versions: 11.0

Failure Type: Unspecified

Found In Build/Fixed In Build: PublicBeta /

Priority/Frequency: Trivial / Some users will encounter

Locale/System: English / Platforms All

Vote Count: 1

See discussion here: http://cfmlblog.adamcameron.me/2014/02/coldfusion-11-preservecaseforstructkey.html

{quote}
The first problem with this is the setting name: this.serialization.preservecaseforstructkey. This is not to do with serialisation... it's simply to do with preserving key case in structs. That the chief use of this is going to be when an object is serialised is neither really here nor there. So it needs a new name. I suggest just ditching the reference to serialisation. Or stick it in a substruct called "codeSettings" or something.
{quote}

Raising this as a BUG as its name is inappropriate.

-- 
Adam

----------------------------- Additional Watson Details -----------------------------

Watson Bug ID:	3712134

External Customer Info:
External Company:  
External Customer Name: Adam Cameron.
External Customer Email:  
External Test Config: My Hardware and Environment details:

Attachments:

Comments:

This has got nothing to do with CF-3712824 (which you've marked this as a duplicate of)??? -- Adam
Comment by External U.
13321 | February 27, 2014 01:10:34 PM GMT
Thanks Adam. Yes, it is not a duplicate - reopening it.
Comment by Rupesh K.
13322 | February 28, 2014 07:38:09 AM GMT
Preserving case for struct keys is largely applicable and noticeable for serialization only, whether it is JSON or webservices. In general, the struct element would be accessed through any key form irrespective of the setting. Also, keeping it under serialization scope would helps the developer to navigate all serialization related settings at one place only. As I assume the real use case of struct key preservation is mainly serialization and hardly anything else. Let me know if you have any other use case in mind.
Comment by Awdhesh K.
13323 | March 03, 2014 01:09:20 AM GMT
Well you confirm what I am pointing out in your own wording! "Preserving case for struct keys is **largely** applicable and noticeable for serialization only" And again: "As **I assume** the real use case of struct key preservation is mainly serialization and **hardly** anything else." (My **emphasis**). You're making my point for me. What you're doing is coupling a current symptom with the solution to the issue that the symptom is... err... symptomatic of. The issue is *not* serialisation, it's the preservation of key-casing. And key-case-preservation is nothing to do with serialisation. It's just that one of the symptoms of CF not doing it sensibly is apparent when the object is serialised. As it stands, the situation might *largely* be symptomatic when serialising, but what about the future? What about when some other situation comes up when key-casing is important, but has nothing to do with serialisation? Why not just get this *right*, instead of just bodging-together something that is "close enough"? -- Adam
Comment by External U.
13324 | March 03, 2014 02:45:57 AM GMT
+1 - I b/c agree w/ "but what about the future? What about when some other situation comes up when key-casing is important, but has nothing to do with serialisation?"
Vote by External U.
13325 | February 14, 2015 08:30:27 PM GMT