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?
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.
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:
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.
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
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")
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.