C#

EmberJs and ASP.NET Web API and JSON Serialization

I just switched from Angular to Ember for a new project and really enjoying it.  Per the requirements, I need to use ASP.NET WEB API which is actually pretty impressive.  I instantly ran into a problem though.  Ember expects its json results to be wrapped i.e. Ember expects:

But the API returns

After(…)

Serialize Object To Clean XML

I hate all the junk that gets added when serializing object to XML, so here is a quick way to do it cleanly. Here is the dirty way:

The resulting XML looks like this: Here is a cleaner way: And the resulting XML looks like this:
Shortening URLs with bit.ly’s API in .NET

Shortening URLs with bit.ly’s API in .NET

I previously wrote about shortening URLs with TinyURL’s API but my new favorite URL shortener is http://bit.ly and it also has a great API that you can use from within your .net code.  I just recently used in my twitter contest website – tweetastica. The code is also very simple.  I didn’t add all the(…)