Fluid.js and FluidIoC.js both require JSON, but the framework's dependency declaration doesn't specify json2.js.
Description
Environment
Activity
Harris Wong May 30, 2011 at 7:54 PM
Related to json2 removal. https://github.com/fluid-project/infusion/commit/3e45b80f11b88b3b42982c50f23c7eafa3d1244a
Antranig Basman May 11, 2011 at 6:46 PM
We have a few options on how to deal with this. Right now, JSON is only used to provide better formatted error messages in a few log statements. We could go ahead with the dependency as it is, since converting things to JSON is a pretty fundamental activity and the dependency could possibly arise through other means. Another option would be to upgrade the signature of the fluid.log statement to conform to that of console.log
http://getfirebug.com/wiki/index.php/Console_API
It appears there is extra support (At least on Firefox, and possibly Chrome and others) for "rich dumping" of objects, DOM nodes etc - in this way we might be able to avoid the JSON dependence as well as getting better logging. We would need to see what do to on other platforms. Of course ironically the platforms which remove the need for the JSON file are the ones which have support for console.log anyway.
Justin Obara May 11, 2011 at 6:38 PM
we should also make sure to update all of the necessary html files to pull it in too.
Both Fluid.js and FluidIoC.js use the JSON.stringify() method, which causes the JSON object to be a framework-wide dependency. This is fine for modern browsers, which all includes native implementations of JSON. However, for compatibility with IE and older browsers, this means that json2.js is now a requirement of every component and user of Infusion. Do we want this?
If we do, we should update the framework's dependency declaration to include json2.js (although sending this down to modern browsers is a bit of a waste of bytes).