public void EmitDefaultValueTest()
        {
            EmitDefaultValueClass c = new EmitDefaultValueClass();

#if !(NET20 || NET35 || NETFX_CORE || PORTABLE)
            DataContractJsonSerializer jsonSerializer = new DataContractJsonSerializer(typeof(EmitDefaultValueClass));

            MemoryStream ms = new MemoryStream();
            jsonSerializer.WriteObject(ms, c);

            Assert.AreEqual("{}", Encoding.UTF8.GetString(ms.ToArray()));
#endif

            string json = JsonConvert.SerializeObject(c);

            Assert.AreEqual("{}", json);
        }
        public void EmitDefaultValueTest()
        {
            EmitDefaultValueClass c = new EmitDefaultValueClass();

#if !(NET20 || NET35 || NETFX_CORE || PORTABLE)
            DataContractJsonSerializer jsonSerializer = new DataContractJsonSerializer(typeof(EmitDefaultValueClass));

            MemoryStream ms = new MemoryStream();
            jsonSerializer.WriteObject(ms, c);

            Assert.AreEqual("{}", Encoding.UTF8.GetString(ms.ToArray()));
#endif

            string json = JsonConvert.SerializeObject(c);

            Assert.AreEqual("{}", json);
        }