Adithya Sai
Adithya Sai

Reputation: 1740

'JavaScriptSerializer' could not be found .net core

when trying to initialize a variable

JavaScriptSerializer javascriptSerializer = new JavaScriptSerializer();

I am getting the following error : 'JavaScriptSerializer' could not be found .net core. i also tried to include the namespace 'System.Web.Script.Serialization' but even that is not found.

How to solve it?

Upvotes: 3

Views: 9975

Answers (1)

Transcendent
Transcendent

Reputation: 5755

Adding it via Nuget may solve your problem. Open the Nuget package manager and type in the following command:

Install-Package WebApiContrib.Formatting.JavaScriptSerializer

Edit:

Newtonsoft.Json is the standard nowadays. It is also known as Json.Net.

Upvotes: 1

Related Questions