How to use JavaScriptSerializer in ASP.NET 5?

I am transferring my project to DNX-Core 5.0and trying to get the job done, but I cannot find the classes JavaScriptSerializerand AppSettingReader. I know that it is System.Webdeleted, so please help me find an alternative to using them.

Is there any Nuget available to enable them?

+3
source share
1 answer

The ASP.Net 5 team dropped JavaScriptSerializerin favor of the widely used package Newtonsoft.Json, but they provided JsonOutputFormatter and JsonInputFormatter for use with MVC to be able to return objects more directly.

For AppSettingReaderyou need to look at the new ASP.Net 5 configuration model . This is described in detail in several blogs during its construction. These messages contain only detailed information on how to load individual fields, but tests in the Model Model show that you can directly link to an object.

+7
source

All Articles