简体   繁体   English

如何在ClassLibrary中引用JSON序列化?

[英]How to reference JSON serialization in ClassLibrary?

What library I need to reference to use System.Web.Script.Serialization in Class Library ? 我需要什么库参考使用System.Web.Script.SerializationClass Library

System.Web has been already referenced but using System.Web.Script.Serialization ; System.Web已经被引用,但使用System.Web.Script.Serialization ; still failed. 仍然失败了。 Target Framework is 4.0. 目标框架是4.0。 In WebApplication project everything is fine. 在WebApplication项目中,一切都很好。

System.Web.Extensions is the assembly you need to reference. System.Web.Extensions是您需要引用的程序集。

For future reference, this information can be found on the majority of the MSDN Documentation pages. 为了将来参考,可以在大多数MSDN文档页面上找到此信息。 It is found directly under the Inheritance Hierarchy: 它直接在继承层次结构下找到:

Namespace : System.Web.Script.Serialization 命名空间 :System.Web.Script.Serialization
Assembly : System.Web.Extensions (in System.Web.Extensions.dll) 程序集 :System.Web.Extensions(在System.Web.Extensions.dll中)

MSDN - JavaScriptSerializer Class MSDN - JavaScriptSerializer类

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM