Tag:

示例:Mono的DataContractJsonSerializer不会序列化,但.NET会

这是一个准备在Xamarin和VS2013中运行的程序。 我有一个问题,单声道不调用序列化器子类,并需要解决该问题。 题 我应该如何修改SetMembershipProof,以便它将调用位于嵌套子类中的属性[OnSerializing]的方法? using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Runtime.Serialization; using System.Runtime.Serialization.Json; using System.Text; using System.Threading.Tasks; namespace MonoBug { class Program { static void Main(string[] args) { SetMembershipProof2 setMembershipProof = new SetMembershipProof2(); string setProofJSON = CryptoSerializer.Serialize(setMembershipProof); // Inspect the contents of SetProofJSON, it is null under mono, and not null in […]