Posts Tagged JSON

JSON Libraries Comparison in Unity 5.5

Tags: , , , ,

Unity 5.5 has been out for about a month now and it’s time to update the benchmarks for JSON libraries. Which is fastest now? Which creates the least garbage? Read on to find out!

Read the rest of this article »

1 Comment

Which JSON Library Creates the Most Garbage?

Tags: , , , , , ,

Which JSON library creates the most garbage? That’s a common question I get in response to my JSON articles. Today’s article finds out the answer!

Read the rest of this article »

3 Comments

JSON Libraries Comparison Followup

Tags: , , , ,

I wrote an article when Unity 5.3 came out to test its built-in JSON serializer library against some of the open source JSON libraries. Today’s article updates with Unity 5.4 and adds a requested JSON library—Full Serializer—to the mix. Has Unity 5.4 improved performance? Is the new version of JSON.NET any faster? Can Full Serializer best them all? Read on to find out!

Read the rest of this article »

2 Comments

More JSON Performance Benchmarks

Tags: , , , ,

Last week’s article benchmarked Unity 5.3’s new JsonUtility class against third-party alternatives LitJSON and Json.NET. JsonUtility came out the clear winner, but the question arose about how JsonUtility would fare with bigger or more complex JSON structures. Today’s article answers that question by benchmarking with more types of JSON documents to find out if JsonUtility can maintain its lead.

Read the rest of this article »

3 Comments

JSON Performance Benchmarks

Tags: , , ,

Unity 5.3 came out this week and introduced a new, built-in JSON serializer library. Today’s article compares its performance against some popular third-party JSON serializer libraries to see if Unity’s version is any faster. Read on for the results!

Read the rest of this article »

8 Comments

Making describeTypeJSON 50x Faster than describeType

Tags: , , , , , , , , , , , ,

The hidden describeTypeJSON function is faster than the XML-based describeType function by default, but we can make it even faster. Today’s article describe just how this is done and achieves a nearly 10x speedup!

Read the rest of this article »

1 Comment

describeType vs. describeTypeJSON

Tags: , , , , , ,

flash.utils.describeType has been around since Flash 9 and is the standard way to find out interesting information about a Class type, including its metadata/annotations. However, there’s a hidden function called describeTypeJSON that provides an interesting alternative. Since describeType is notoriously slow, could describeTypeJSON be the speedy alternative we’ve been looking for? Today’s article puts them to the test!

Read the rest of this article »

7 Comments

Custom JSON Parsing with Reviver Functions

Tags: , ,

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 »

No Comments

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 »

20 Comments

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 »

10 Comments