5 Replies Latest reply on Dec 26, 2012 8:52 PM by Flex harUI

    MXMLC throws error for JSON object, Flash Builder OK

    Handycam Level 1

      I have some code in a project that always compiled fine in Flash Builder 4.5 (using the 4.1 SDK).  I am trying to build it with the command-line build using Sublime Text 2, and it fails on this code:



                                              var objSend:Object = new Object();
                                              var dataString:String = JSON.encode(packagedData);
                                              dataString = escape(dataString);
                                              objSend.jsonSendData = dataString;


      It gives an error on that second line:


      Error: Access of undefined property JSON.


      Why?  Is there anything I need to include?