Over a million developers have joined DZone.

Pass JSON To Flash's ExternalInterface

DZone's Guide to

Pass JSON To Flash's ExternalInterface

Free Resource

var json : String =
	"{a: 1, b: 'hello world', c: [1, 3, 4, 5]}";

var o : Object =
	ExternalInterface.call("function(){return " + json + ";"}");

The variable o should now contain an object representation of the string json.
Stolen from http://blog.iconara.net/2007/01/20/parsing-json-using-externalinterface/

Opinions expressed by DZone contributors are their own.


Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.


{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}