How Do I Use Javascriptserializer In Asp.net 5?
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 ple
Solution 1:
The ASP.Net 5 team dropped the JavaScriptSerializer
in favor of the widely used Newtonsoft.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.
Post a Comment for "How Do I Use Javascriptserializer In Asp.net 5?"