-Upgraded to Immutable Collections RTM
-Added missing CLSCompliant attributes
This commit is contained in:
@@ -19,8 +19,6 @@ namespace Newtonsoft.Json.Tests.Documentation.Samples.Linq
|
||||
o["MyArray"] = array;
|
||||
|
||||
string json = o.ToString();
|
||||
|
||||
Console.WriteLine(json);
|
||||
// {
|
||||
// "MyArray": [
|
||||
// "Manual text",
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace Newtonsoft.Json.Tests.Documentation.Samples.Schema
|
||||
public void Example()
|
||||
{
|
||||
#region Usage
|
||||
string schemaJson = @"{
|
||||
JsonSchema schema = JsonSchema.Parse(@"{
|
||||
'description': 'A person',
|
||||
'type': 'object',
|
||||
'properties': {
|
||||
@@ -22,9 +22,7 @@ namespace Newtonsoft.Json.Tests.Documentation.Samples.Schema
|
||||
'items': {'type':'string'}
|
||||
}
|
||||
}
|
||||
}";
|
||||
|
||||
JsonSchema schema = JsonSchema.Parse(schemaJson);
|
||||
}");
|
||||
|
||||
JObject person = JObject.Parse(@"{
|
||||
'name': 'James',
|
||||
|
||||
@@ -961,6 +961,26 @@ now brown cow?", '"', true);
|
||||
Assert.AreEqual(@"""2000-01-01T01:01:01Z""", json);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void DeserializeObject()
|
||||
{
|
||||
string json = @"{
|
||||
'Name': 'Bad Boys',
|
||||
'ReleaseDate': '1995-4-7T00:00:00',
|
||||
'Genres': [
|
||||
'Action',
|
||||
'Comedy'
|
||||
]
|
||||
}";
|
||||
|
||||
Movie m = JsonConvert.DeserializeObject<Movie>(json);
|
||||
|
||||
string name = m.Name;
|
||||
// Bad Boys
|
||||
|
||||
Assert.AreEqual("Bad Boys", m.Name);
|
||||
}
|
||||
|
||||
//[Test]
|
||||
public void StackOverflowTest()
|
||||
{
|
||||
|
||||
@@ -72,9 +72,9 @@
|
||||
<HintPath>..\packages\NUnit.2.6.2\lib\nunit.framework.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Collections.Immutable, Version=1.0.12.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<Reference Include="System.Collections.Immutable, Version=1.0.23.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\packages\Microsoft.Bcl.Immutable.1.0.23-rc\lib\portable-net45+win8+wp8\System.Collections.Immutable.dll</HintPath>
|
||||
<HintPath>..\packages\Microsoft.Bcl.Immutable.1.0.27\lib\portable-net45+win8+wp8\System.Collections.Immutable.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.ComponentModel.DataAnnotations">
|
||||
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
||||
|
||||
@@ -35,9 +35,9 @@
|
||||
<HintPath>..\packages\NUnit.2.6.2\lib\nunit.framework.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Collections.Immutable, Version=1.0.23.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<Reference Include="System.Collections.Immutable, Version=1.0.27.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\packages\Microsoft.Bcl.Immutable.1.0.23-rc\lib\portable-net45+win8+wp8\System.Collections.Immutable.dll</HintPath>
|
||||
<HintPath>..\packages\Microsoft.Bcl.Immutable.1.0.27\lib\portable-net45+win8+wp8\System.Collections.Immutable.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.ComponentModel.DataAnnotations" />
|
||||
<Reference Include="System.Core" />
|
||||
|
||||
@@ -75,4 +75,4 @@ using System.Security;
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
[assembly: AssemblyVersion("4.5.0.0")]
|
||||
[assembly: AssemblyFileVersion("5.0.6.16513")]
|
||||
[assembly: AssemblyFileVersion("5.0.6.16530")]
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Microsoft.Bcl.Immutable" version="1.0.23-rc" targetFramework="net45" />
|
||||
<package id="Microsoft.Bcl.Immutable" version="1.0.27" targetFramework="net45" />
|
||||
<package id="NUnit" version="2.6.2" targetFramework="net45" />
|
||||
</packages>
|
||||
Reference in New Issue
Block a user