Subscribe to the RSS feed then follow me on twitter at @mrlacey

Tuesday, August 20, 2013

Faster JSON serialization with ServiceStack.Text

I've been using JSON.Net to serialize objects to and from JSON for years.

However, ever since I heard that ServiceStack had a faster JSON serializer I've wanted to try it.
After all, speed is important, especially on a mobile devices, and if I can make my code run faster by just swapping out one third party library for another then that's a simple decision.


Today I finally got around to trying it and to do so I built a console app so I could put the two methods side by side.


Look both methods are very similar. And as I rarely do anything more complicated with JSON than just serialize or deserialize this is great.

Obviously the above isn't enough for me to prove that it's faster. I'm just trusting the benchmark testing done by others.

It's also a smaller DLL so it will reduce the overall XAP size and download time. Plus app load time too. :)



My only slight reservation is that ServiceStack doesn't give me the debugging assistance I get with Json.Net. Maybe I'll look to just use Json.Net in the debug build if this becomes an issue.


If you've built Windows Phone or Windows Store apps you can cross-promote them with AdDuplex to get more users.

4 comments:

  1. You know your projects stand out of the herd. There is something special about them. It seems to me all of them are really brilliant!

    ReplyDelete
  2. Thanks for the such a wonderful post and great coding. I love it very much

    ReplyDelete
  3. I basically get a essential details right here and furthermore this is often really Maine I trying. because of your present posting sports authority coupons

    ReplyDelete
  4. The Window Phone is focused on a couple of centers; ponsisting of pictures, individuals, music, recreations, feature, office and commercial center. You will have the capacity to get access get to your individual contacts as well as to Myspace and Facebook. Feature and music is the result of Zune's HD programming which is on the telephone hid within the Window Phone. On the off chance that you happen to be a feature diversion significant other, you will likely be pleased to realize that X-Box Live is found in that spot additionally on the telephone. You will be glad to know likewise that your scores can be snared to your X-Box that is at your home.All the day we enjoy. best research paper writing services for more info and any type of necessary detail.

    ReplyDelete