Development – Leet 4 Life

Software Development Code Samples and More

Skip to: Content | Sidebar | Footer

Tag: Serialization

Serializing NameValueCollection to JSON in ASP.NET MVC Web APIs

10 June, 2013 | ASP.NET, C#. NET | By: Michael Merrell

Recently I had the need to serialize a NameValueCollection object through MVC’s WebAPIs. However the inherit object that is provided in the Specialized Collections .NET Framework does not play nicely with JSON serialization. Because of this I ended up have to write my own set of custom classes for serializing NameValueCollection from JSON to be used inside the functionality of my Web APIs. This code is simple and gets the job done very well. Then the client side JavaScript: Read more about my problem of Serializing NameValueCollection to JSON using MVC Web API