Type 1120 Access of undefined property JSON error in FLEX 4.6

Type 1120 Access of undefined property JSON

If you were working with Flex 4/3 or any lesser versions of Flex, you would be using corelib.swc or as3corelib.swc to access JSON property.

You also would have imported something like import com.adobe.serialization.json.JSON;

Well with Flex 4.6 it is not necessary either the swc or import any package is not necessary.

if you are getting this error Type 1120 Access of undefined property JSON

You just need to remove the above mentioned import and

and then you’ll need to modify the code,

JSON.decode(myString); to JSON.parse(myString);

JSON.encode(myObject); to JSON.stringify(myObject);


7 Responses to “Type 1120 Access of undefined property JSON error in FLEX 4.6”

  1. hey, I’m unable to subscribe for ones RSS feed. Can you support or do you know why? thanks for the info.

    • Ajeeth boaz says:

      Hi, can u please tell me which sites’s RSS feed your trying to subscribe so that I can check and let you know.

    • Gurning says:

      Hi Isambard,Thank you for using Spark Tree. You can implement drag and drop the same way it’s uullsay done for Spark List use dragEnabled, dropEnabled and dragMoveEnabled.There is an issue specific for Spark Tree if you are moving an open tree folder, you should close it before start dragging since List does not expect that removing one node can remove some other nodes (child nodes of an open folder).Another task is to distinguish whether node is dropped between nodes on into one of the nodes.All in all I would suggest to checkout the source of Spark Tree and to work closely with it and Spark List source to achieve all that.Sorry, don’t have time to give you a complete solution for your task. Good luck!

  2. Bid-Ninja…

    [...]we like to honor other sites on the web, even if they aren’t related to us, by linking to them. Below are some sites worth checking out[...]…

    • Adele says:

      Last one to uitzlie this is a rotten egg!

    • Aya says:

      I’m trying to use the sparkTree but genittg a compile error in the Tree class where you override:override protected function adjustSelectionAndCaretUponNavigation(event:KeyboardEvent):voidSpecifically, the compiler can’t find: mapKeycodeForLayoutDirection(event)I’ve looked through UIComponent (is that where the original function lies?), but can’t find it. Is this possibly a version issue? I’m using Flex 4 SDK (not yet on 4.5). I notice also on one of your issues, that someone has made some changes to that override, back in March, but that is not part of my problem.Any feedback is appreciated.thanks, Mike

  3. Bhozz says:

    Hi there,Unfortunately, I think we found another bug with Spark Tree. The error ocrcus when you ALT+TAB out of the AIR Application to another window (in Windows), and ALT+TAB back in. We have the data provider set to an XMLListCollectionHere is the error generated:TypeError: Error #1009: Cannot access a property or method of a null object reference.at spark.components::Scroller/focusInHandler()[E:\dev\4.5.1\frameworks\projects\spark\src\spark\components\Scroller.as:1273]at flash.display::Stage/set focus()at mx.core::UIComponent/setFocus()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\core\UIComponent.as:9895]at mx.managers::FocusManager/activateWindowHandler()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\managers\FocusManager.as:729]at flash.events::EventDispatcher/dispatchEventFunction()at flash.events::EventDispatcher/dispatchEvent()at mx.core::UIComponent/dispatchEvent()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\core\UIComponent.as:13128]at spark.components::WindowedApplication/nativeWindow_activateHandler()[E:\dev\4.5.1\frameworks\projects\airspark\src\spark\components\WindowedApplication.as:2739

  4. I will immediately take hold of your rss feed as I can’t to find your email subscription hyperlink or e-newsletter service. Do you have any? Kindly allow me realize so that I may subscribe. Thanks.
    [url=http://www.gscraper.com/]get backlinks[/url]


Get every new post delivered to your Inbox

Join other followers