-Added additional frameworks to project.json files

This commit is contained in:
James Newton-King
2015-08-22 19:08:40 +12:00
parent 6b02abe20c
commit a9ea63da59
142 changed files with 1090 additions and 222 deletions
@@ -63,7 +63,7 @@ using System.Diagnostics;
using Newtonsoft.Json.Bson;
using Newtonsoft.Json.Linq;
using Newtonsoft.Json.Converters;
#if !NET20
#if !(NET20 || NET35)
using System.Runtime.Serialization.Json;
#endif
using Newtonsoft.Json.Serialization;
@@ -1409,7 +1409,7 @@ namespace Newtonsoft.Json.Tests.Serialization
}
}
#if !NET20
#if !(NET20 || NET35)
[DataContract]
public class BaseDataContractWithHidden
{
@@ -1750,7 +1750,7 @@ namespace Newtonsoft.Json.Tests.Serialization
string jsonText = JsonConvert.SerializeObject(testDictionary);
#if !NET20
#if !(NET20 || NET35)
MemoryStream ms = new MemoryStream();
DataContractJsonSerializer serializer = new DataContractJsonSerializer(typeof(Dictionary<string, object>));
serializer.WriteObject(ms, testDictionary);
@@ -1974,7 +1974,15 @@ keyword such as type of business.""
ExceptionAssert.Throws<JsonSerializationException>(() => { JsonConvert.SerializeObject(new BadJsonPropertyClass()); }, @"A member with the name 'pie' already exists on 'Newtonsoft.Json.Tests.TestObjects.BadJsonPropertyClass'. Use the JsonPropertyAttribute to specify another name.");
}
#if !NET20
[Test]
public void InvalidBackslash()
{
string json = @"[""vvv\jvvv""]";
ExceptionAssert.Throws<JsonReaderException>(() => { JsonConvert.DeserializeObject<List<string>>(json); }, @"Bad JSON escape sequence: \j. Path '', line 1, position 7.");
}
#if !(NET20 || NET35)
[Test]
public void Unicode()
{
@@ -2011,14 +2019,6 @@ keyword such as type of business.""
#endif
}
[Test]
public void InvalidBackslash()
{
string json = @"[""vvv\jvvv""]";
ExceptionAssert.Throws<JsonReaderException>(() => { JsonConvert.DeserializeObject<List<string>>(json); }, @"Bad JSON escape sequence: \j. Path '', line 1, position 7.");
}
[Test]
public void DateTimeTest()
{
@@ -4259,7 +4259,7 @@ Path '', line 1, position 1.");
public string Ethnicity { get; set; }
}
#if !NET20
#if !(NET20 || NET35)
public class DataContractJsonSerializerTestClass
{
public TimeSpan TimeSpanProperty { get; set; }
@@ -41,7 +41,7 @@ using Assert = Newtonsoft.Json.Tests.XUnitAssert;
#else
using NUnit.Framework;
#endif
#if !(NETFX_CORE || NET20)
#if !(NETFX_CORE || NET20 || NET35)
using System.Runtime.Serialization.Json;
#endif
using Newtonsoft.Json.Serialization;
@@ -63,7 +63,7 @@ namespace Newtonsoft.Json.Tests.Serialization
nonSerializedField = "Error"
};
#if !(NETFX_CORE || NET20 || PORTABLE || DNXCORE50 || PORTABLE40)
#if !(NETFX_CORE || NET20 || NET35 || PORTABLE || DNXCORE50 || PORTABLE40)
MemoryStream ms = new MemoryStream();
DataContractJsonSerializer dataContractJsonSerializer = new DataContractJsonSerializer(typeof(SerializableType));
dataContractJsonSerializer.WriteObject(ms, serializableType);