ServiceStack.Text and Windows Phone07 Apr 2012
Recently for one of my projects at work we needed a fast and easy to use JSON Serializer and I immediately remembered a tweet from Jeff Atwood with a link to a list of open source projects that they had at Stack Exchange. Among them they had and amazingly fast JSON serializer ServiceStack.Text.
So, I decided to give it a try. However after I downloaded the project and tried to use it in a sample Windows Phone project, I found out that ServiceStack.Text was lacking Windows Phone support. However it did support Silverlight 4&5, Xbox and Mono. After a quick search over DuckDuckGo.com (which by the way has become my main search engine) I found a blog post by Chris Santy where he writes about some changes he did to ServiceStack.Text in order to use it on the phone. Unfortunately, although he wrote that he will make a pull request with his changes, he never made one.
So, after adding some of his changes (Thank you Chris!) and some of mine I got a working version of ServiceStack.Text for Windows Phone. I immediately made a pull request to the main project and today my request was granted. Over the weekend Demis promised to create a build and get it on Nuget. Which is great News for Windows Phone developers and for me personally since this was my first ever pull-request!
Thank you Demis once again for granting my request! Now I can speak of myself as an officialy OpenSource contributor!
But I have to say that although the current version is much faster that Json.NET, it still loses performance compared to fastJSON for example. Here are some benchmark results for 10000 iterations using a JSON sample from GitHubRestTests.cs
* Serialize Standard stands for fastJSON implementation.
If you are a Windows Phone developer go fork ServiceStack.Text at GitHub and if you have any comments or question, please leave them in the comments section.