Cannot find DataContractJsonSerializer from an Asp.Net Mvc application

Matt picture Matt · Jul 14, 2009 · Viewed 15k times · Source

I can't get access to the DataContractJsonSerializer method from System.Runtime.Serialization.Json

If I do:

using System.Runtime.Serialization.Json;

I get an error...

How can I access this in my Asp.Net Mvc app so I can use the DataContractJsonSerializer method

Answer

Brad Wilson picture Brad Wilson · Jul 15, 2009

Make sure you've referenced the DLL where this type lives: System.ServiceModel.Web.dll