RE: [coldbox:11757] Upgrading to ColdBox 3.5? Read this...

I searched the group history for “andrew scott json” and get many pages of results. Can you provide a link to to the thread on our JSON issues to refresh our memories?

As far as bean factory compatability mode-- I don’t think I’m following what you’re saying about a cfc and a query. Let’s back up a bit and find out if you’re actually use the bean factory in compat mode. Do you still use /config/modelMappings.cfm to map your models or do you have wirebox.enabled = true in your coldbox.cfc file and use a wirebox.cfc config for your model mappings?

Thanks!

~Brad

Not sure how to link in gmail web interface, but the subject is

I see the Json problem still exists on Final CB3.0 release

As for bean Factory maybe the compat mode is not what I am using then. As what I do is create a bean that is an Entity, that I can use getters/setters for.

So when I have a form, or some other configuration that I wan to hold in a singleton. I use the beanFactory to populate into the bean from a query, or form.

By the sounds of it this is not something you plan on dropping then.

Andrew,

Are you opposed to embracing CF’s native JSON support because you are running on CF8?

There is a major reason to drop ColdBox’s abstraction: I can serialize a complex structure in ColdFusion within 6ms; however, the same structure serialized using ColdBox’s abstraction can take 500ms. The only special consideration is the way I create keys within structs. I must create my structs with strings to ensure the case is respected by ColdFusion:

myStruct = { ‘keyOne’ = someValue }.

Aaron

Aaron,

If as I stated ColdFusion’s Json was not buggy then I would use it, if you notice in that snippet of code for the json plugin there is an option there that is NOT supported in ColdFusion.

Secondly what makes you second guess what version of ColdFusion that I may be running on?

Thirdly I have never had any of my code take anything more than 10ms when doing my Json stuff, so not sure where you are getting 500ms from. Might be that for you but it is not that for me.

Lastly, like I said if ColdFusion version of Json was not buggy I would use it. If CF version supported the nest of objects like I need in that patch I would use it. It doesn’t so I can’t adopt it.

But please Aaron don’t assume I am on CF7, or CF8…

And if you don’t wont the ‘’ around the actual value then modify the plugin it isn’t hard to change.

Andrew the json plugin will be added to forgebox so it can be used instead of the core one which will just be the abstraction this way you still have a choice.

Luis Majano
CEO
Ortus Solutions, Corp
Toll free phone/fax: 1-888-557-8057
Mobile: 909-248-3408
www.ortussolutions.com
www.coldbox.org

And what about ColdBox itself with renderData? Will that be able to use the abstracted plugin?

You just tweeted to me you were on CF8.

I haven’t tweeted anything for over a week

My mistake.

I use serializeJSON a lot and love it, but I have been bitten by how
SerializeJSON works depending which hotfix you are running.

Something that was fixed in CF9.01 cumulative hotfix 1 is: #83638
serializeJSON converts integer to string.
http://kb2.adobe.com/cps/918/cpsid_91836.html

However, the hotfix has a new bug which broke one of my apps. I
blogged about it here if anyone wants a read:
http://www.aliaspooryorik.com/blog/index.cfm/e/posts.details/post/bug-in-serializejson-296

- John

I take it you haven’t tried this with HotFix 2 as yet?

Though I haven't had a chance to actually see the results of this, CF
Cumulative Hot Fix 2 states it has fixed..
"serializeJSON converts integer to string."
and
"serializeJSON incorrectly serializes nested objects. Also, in the
case of circular references, for example, when handling bidirectional
ORM relationship, repeating entities are represented as empty strings
instead of empty objects."
http://kb2.adobe.com/cps/918/cpsid_91836.html

Hi Andrew,

My particular issue has been verified but not fixed so I haven't
installed the hotfix 2.

http://cfbugs.adobe.com/cfbugreport/flexbugui/cfbugtracker/main.html#bugId=85760

Cool, wasn’t sure as I do recall some of the notes talking about the json stuff.

Now I looked it up and if anyone can verify that Adobe has indeed fixed the nesting of objects then, I would be glad to go native support.

But if it hasn’t then we really do need it in there, because things that use json like renderData would make it a little hard for us to overwrite. Unless Luis you made it easier to user a different plugin for rendering of all types, like a use this plugin instead of the default one.

But I vote it stays until someone can confirm the bugs in the native json are fixed 100%.

I'm running CF8 fwiw.... does this json stuff break my app? I mostly
rely on lowercase keys (the native coldfusion one insists on
uppercasing my keys).

Will this still work in 3.5?
JSON.encode(data=obj, keyCase="lower")

Andrew,

Have you thought about making a pull request on 3.5 that enables the behavior you would like to keep?

-A

keycase is not relevant to coldfusion native functions. You can still use the JSON old plugin http://coldbox.org/forgebox/view/JSON

Luis F. Majano
CEO
Ortus Solutions, Corp
www.ortussolutions.com

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

Social: twitter.com/lmajano facebook.com/lmajano

how about the built in stuff like renderData? Uppercase keys?

The native coldfusion functions do not allow for case selection, so that would be lost unless you use the old JSON plugin in forge box and place it in your extensions folder.

Luis F. Majano
CEO
Ortus Solutions, Corp
www.ortussolutions.com

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

Social: twitter.com/lmajano facebook.com/lmajano

ah ok - so the presence of the plugin will cause the inbuilt methods to use it implicitly? That’s a good solution.