as3corelib icon indicating copy to clipboard operation
as3corelib copied to clipboard

the JSON class conflicts with the Native JSON class for FlashPlayer 11

Open 9re opened this issue 14 years ago • 2 comments

no one would use both ECMA5 JSON(JSON.stringify, JSON.parse) and as3corelib JSON except for benchmarking purposes. but in some day the default flex-config with FlashBuilder would target

<swf-version>13</swf-version> 

and the globalplayer.swc will include flash player 11 apis. you cannot compile old projects with as3corelib in these settings because of the name conflicts of class names

here is the minimum test code which reproduces the problem: https://gist.github.com/1263525

9re avatar Oct 05 '11 03:10 9re

I think they'll need to either create a separate Flash 11 version of the swc, or rename/remove the JSON class in the next version (with an appropriate note about the change/removal).

brian428 avatar Nov 30 '11 15:11 brian428

+1. The main issue that I'm running into is that the UnitTest don't run. I think the simple resolution is hardcoding the com.adobe.serialization.json.JSON to the tests so Flash is not confused by the built in JSON class.

This library is still helpful today for people that still need to support Flash 9 players.

haysclark avatar May 11 '15 20:05 haysclark