I am porting my project to DNX-Core 5.0
and trying to get work but I cannot find the JavaScriptSerializer
and AppSettingReader
classes. I know the System.Web
is removed and so please anyone help me to find the alternative of using them.
Is there any Nuget available to include them?
The ASP.Net 5 team dropped the
JavaScriptSerializer
in favor of the widely usedNewtonsoft.Json
package, but they did provide a JsonOutputFormatter and a JsonInputFormatter for use with MVC to be able to return objects more directly.For the
AppSettingReader
you'll want to look at the new ASP.Net 5 Configuration Model. This has been detailed in a few blog posts while it's being built. These posts only detail how to load out individual fields, but the tests in the Options Model show that you can bind directly to an object.