Json.Net for Unity support

After I bought Shooter AI, it prompted me saying a new update of the A* Pathfinding is available. So I came to the official website and had a look around. I’ve downloaded the latest free version and am contemplating purchasing the Pro version.

However in my projects I’m currently using Json.net for Unity from the Asset Store. I quite like it (being the closest .Net library to match Jackson from the Java world). It works on all Unity platforms and seamlessly replaces the Json.net that comes with Photon Networking and any other plugins that relies on Json.net dll.

I noticed that A* Pathfinding is using Jsonfx. Doing some googling I found some benchmarks which indicate Json.net to have higher performance than JsonFx. Also as a purist web/RESTful API developer, I would like to have just one flavour of JSON de/serialiser in my project as opposed to multiple libraries doing the same thing.

I had a quick look at the code and noticed that several concepts are common across JsonFx and Json.net, such as Custom JsonConverters. I wanted to have a go and implementing the feature myself but there are no unit tests and thus I can’t be sure whether my changes will break anything.

I was wondering if such as feature would be something worth considering for the official support folks? I’m happy for it to be available in the Pro version (considering Json.net for Unity is paid too), I would certainly buy it. Also I would be eager to help beta testing if it does make the cut.


I don’t think I will implement that. It takes some effort to support multiple different libraries and there is not that much to gain on it. If you really want to remove the library there is support for using a simple binary serializer (see http://arongranberg.com/astar/docs_dev/compiler-directives.php). However by doing so you will sacrifice some backwards and forwards compatibility.