Access of undefined property JSON

First we have to download the library and can find it at http://code.google.com/p/as3corelib/. Then follow these steps to add your JSON library to your Flex project:

   1. Download the .zip archive and extract it. What you need is the .swc file in the lib folder.
   2. In Flex Builder / Flash Builder, go to your project’s properties, and then to the Flex Build Path panel.
   3. Click on Add SWC, and select the as3corelib.swc file
   4. In your project, add the following line: import com.adobe.serialization.json.JSON;