Posts Tagged JSON

Custom JSON Parsing with Reviver Functions


The built-in JSON class that debuted with Flash Player 11 has an interesting feature that few AS3 programmers know about. It turns out that JSON.parse doesn’t just take the JSON document to parse but also a “reviver” Function. What is this? How can it be used? Find out more in today’s article and take advantage of this powerful parsing option.

Read the rest of this article »

1 Comment

How To Fix the XML Memory “Leak”

Tags: , , , , ,

Dealing with XML files can very easily trigger Flash to “leak” memory. Your app may only keep a tiny fraction of the XML file’s contents, but the whole file may stay in memory and never get garbage collected. Today’s article examines how this happens and how you can clean up all that unused memory.

Read the rest of this article »


Serialize Anything: Part 2

Tags: , , , , , , , , ,

One of the new features in Flash Player 11 is a native JSON encoder/decoder class. In the Serialize Anything article, I neglected to add JSON as an option for serializing and deserializing arbitrary objects. In today’s followup we’ll take a look at the performance of the native JSON class and compare it to ByteArray.readObject/writeObject and XML.

Read the rest of this article »