-Added NuPack to build process
-Fixed deserializing structs when reusing existing values -Renamed Windows Phone 7 dll to Newtonsoft.Json.WindowsPhone.dll
This commit is contained in:
@@ -0,0 +1,12 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<package>
|
||||||
|
<metadata>
|
||||||
|
<id>Newtonsoft.Json</id>
|
||||||
|
<version>3.5.8</version>
|
||||||
|
<authors>
|
||||||
|
<author>James Newton-King</author>
|
||||||
|
</authors>
|
||||||
|
<description>Json.NET is a popular high-performance JSON framework for .NET</description>
|
||||||
|
<language>en-US</language>
|
||||||
|
</metadata>
|
||||||
|
</package>
|
||||||
+26
-8
@@ -4,6 +4,7 @@
|
|||||||
$signAssemblies = $false
|
$signAssemblies = $false
|
||||||
$signKeyPath = "D:\Development\Releases\newtonsoft.snk"
|
$signKeyPath = "D:\Development\Releases\newtonsoft.snk"
|
||||||
$buildDocumentation = $false
|
$buildDocumentation = $false
|
||||||
|
$buildNuPackage = $true
|
||||||
|
|
||||||
$baseDir = resolve-path ..
|
$baseDir = resolve-path ..
|
||||||
$buildDir = "$baseDir\Build"
|
$buildDir = "$baseDir\Build"
|
||||||
@@ -13,11 +14,11 @@
|
|||||||
$releaseDir = "$baseDir\Release"
|
$releaseDir = "$baseDir\Release"
|
||||||
$workingDir = "$baseDir\Working"
|
$workingDir = "$baseDir\Working"
|
||||||
$builds = @(
|
$builds = @(
|
||||||
@{Name = "Newtonsoft.Json"; TestsName = "Newtonsoft.Json.Tests"; Constants=""; FinalDir="DotNet"; Framework="net-4.0"},
|
@{Name = "Newtonsoft.Json"; TestsName = "Newtonsoft.Json.Tests"; Constants=""; FinalDir="Net"; NuPackDir = "40"; Framework="net-4.0"},
|
||||||
@{Name = "Newtonsoft.Json.Phone"; TestsName = $null; Constants="SILVERLIGHT;WINDOWS_PHONE"; FinalDir="Phone"; Framework="net-4.0"},
|
@{Name = "Newtonsoft.Json.WindowsPhone"; TestsName = $null; Constants="SILVERLIGHT;WINDOWS_PHONE"; FinalDir="WindowsPhone"; NuPackDir = "WP"; Framework="net-4.0"},
|
||||||
@{Name = "Newtonsoft.Json.Silverlight"; TestsName = "Newtonsoft.Json.Tests.Silverlight"; Constants="SILVERLIGHT"; FinalDir="Silverlight"; Framework="net-2.0"},
|
@{Name = "Newtonsoft.Json.Silverlight"; TestsName = "Newtonsoft.Json.Tests.Silverlight"; Constants="SILVERLIGHT"; FinalDir="Silverlight"; NuPackDir = "SL"; Framework="net-2.0"},
|
||||||
@{Name = "Newtonsoft.Json.Net20"; TestsName = "Newtonsoft.Json.Tests.Net20"; Constants="NET20"; FinalDir="DotNet20"; Framework="net-2.0"},
|
@{Name = "Newtonsoft.Json.Net35"; TestsName = "Newtonsoft.Json.Tests.Net35"; Constants="NET35"; FinalDir="Net35"; NuPackDir = "35"; Framework="net-2.0"},
|
||||||
@{Name = "Newtonsoft.Json.Net35"; TestsName = "Newtonsoft.Json.Tests.Net35"; Constants="NET35"; FinalDir="DotNet35"; Framework="net-2.0"}
|
@{Name = "Newtonsoft.Json.Net20"; TestsName = "Newtonsoft.Json.Tests.Net20"; Constants="NET20"; FinalDir="Net20"; NuPackDir = "20"; Framework="net-2.0"}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -55,11 +56,11 @@ task Build -depends Clean {
|
|||||||
|
|
||||||
# Merge LinqBridge into .NET 2.0 build
|
# Merge LinqBridge into .NET 2.0 build
|
||||||
task Merge -depends Build {
|
task Merge -depends Build {
|
||||||
$binaryDir = "$sourceDir\Newtonsoft.Json\bin\Release\DotNet20"
|
$binaryDir = "$sourceDir\Newtonsoft.Json\bin\Release\Net20"
|
||||||
MergeAssembly "$binaryDir\Newtonsoft.Json.Net20.dll" $signKeyPath "$binaryDir\LinqBridge.dll"
|
MergeAssembly "$binaryDir\Newtonsoft.Json.Net20.dll" $signKeyPath "$binaryDir\LinqBridge.dll"
|
||||||
del $binaryDir\LinqBridge.dll
|
del $binaryDir\LinqBridge.dll
|
||||||
|
|
||||||
$binaryDir = "$sourceDir\Newtonsoft.Json.Tests\bin\Release\DotNet20"
|
$binaryDir = "$sourceDir\Newtonsoft.Json.Tests\bin\Release\Net20"
|
||||||
MergeAssembly "$binaryDir\Newtonsoft.Json.Tests.Net20.dll" $signKeyPath "$binaryDir\LinqBridge.dll"
|
MergeAssembly "$binaryDir\Newtonsoft.Json.Tests.Net20.dll" $signKeyPath "$binaryDir\LinqBridge.dll"
|
||||||
MergeAssembly "$binaryDir\Newtonsoft.Json.Net20.dll" $signKeyPath "$binaryDir\LinqBridge.dll"
|
MergeAssembly "$binaryDir\Newtonsoft.Json.Net20.dll" $signKeyPath "$binaryDir\LinqBridge.dll"
|
||||||
del $binaryDir\LinqBridge.dll
|
del $binaryDir\LinqBridge.dll
|
||||||
@@ -77,11 +78,28 @@ task Package -depends Merge {
|
|||||||
|
|
||||||
if ($buildDocumentation)
|
if ($buildDocumentation)
|
||||||
{
|
{
|
||||||
exec { msbuild "/t:Clean;Rebuild" /p:Configuration=Release "/p:DocumentationSourcePath=$workingDir\Package\Bin\DotNet" $docDir\doc.shfbproj } "Error building documentation. Check that you have Sandcastle, Sandcastle Help File Builder and HTML Help Workshop installed."
|
exec { msbuild "/t:Clean;Rebuild" /p:Configuration=Release "/p:DocumentationSourcePath=$workingDir\Package\Bin\Net" $docDir\doc.shfbproj } "Error building documentation. Check that you have Sandcastle, Sandcastle Help File Builder and HTML Help Workshop installed."
|
||||||
|
|
||||||
move -Path $workingDir\Documentation\Documentation.chm -Destination $workingDir\Package\Documentation.chm
|
move -Path $workingDir\Documentation\Documentation.chm -Destination $workingDir\Package\Documentation.chm
|
||||||
move -Path $workingDir\Documentation\LastBuild.log -Destination $workingDir\Documentation.log
|
move -Path $workingDir\Documentation\LastBuild.log -Destination $workingDir\Documentation.log
|
||||||
}
|
}
|
||||||
|
if ($buildNuPackage)
|
||||||
|
{
|
||||||
|
New-Item -Path $workingDir\NuPack -ItemType Directory
|
||||||
|
Copy-Item -Path "$buildDir\Newtonsoft.Json.nuspec" -Destination $workingDir\NuPack\Newtonsoft.Json.nuspec -recurse
|
||||||
|
|
||||||
|
foreach ($build in $builds)
|
||||||
|
{
|
||||||
|
$name = $build.TestsName
|
||||||
|
$finalDir = $build.FinalDir
|
||||||
|
$frameworkDir = $build.NuPackDir
|
||||||
|
|
||||||
|
Copy-Item -Path "$sourceDir\Newtonsoft.Json\bin\Release\$finalDir" -Destination $workingDir\NuPack\lib\$frameworkDir -recurse
|
||||||
|
}
|
||||||
|
|
||||||
|
exec { .\Tools\NuPack\NuPack.exe $workingDir\NuPack\Newtonsoft.Json.nuspec }
|
||||||
|
move -Path .\*.nupkg -Destination $workingDir\NuPack
|
||||||
|
}
|
||||||
|
|
||||||
Copy-Item -Path $docDir\readme.txt -Destination $workingDir\Package\
|
Copy-Item -Path $docDir\readme.txt -Destination $workingDir\Package\
|
||||||
Copy-Item -Path $docDir\versions.txt -Destination $workingDir\Package\Bin\
|
Copy-Item -Path $docDir\versions.txt -Destination $workingDir\Package\Bin\
|
||||||
|
|||||||
@@ -47,7 +47,7 @@
|
|||||||
<DebugSymbols>true</DebugSymbols>
|
<DebugSymbols>true</DebugSymbols>
|
||||||
<DebugType>full</DebugType>
|
<DebugType>full</DebugType>
|
||||||
<Optimize>false</Optimize>
|
<Optimize>false</Optimize>
|
||||||
<OutputPath>bin\Debug\DotNet20\</OutputPath>
|
<OutputPath>bin\Debug\Net20\</OutputPath>
|
||||||
<DefineConstants>TRACE;DEBUG;NET20</DefineConstants>
|
<DefineConstants>TRACE;DEBUG;NET20</DefineConstants>
|
||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<WarningLevel>4</WarningLevel>
|
<WarningLevel>4</WarningLevel>
|
||||||
@@ -56,7 +56,7 @@
|
|||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||||
<DebugType>pdbonly</DebugType>
|
<DebugType>pdbonly</DebugType>
|
||||||
<Optimize>true</Optimize>
|
<Optimize>true</Optimize>
|
||||||
<OutputPath>bin\Release\DotNet20\</OutputPath>
|
<OutputPath>bin\Release\Net20\</OutputPath>
|
||||||
<DefineConstants>TRACE</DefineConstants>
|
<DefineConstants>TRACE</DefineConstants>
|
||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<WarningLevel>4</WarningLevel>
|
<WarningLevel>4</WarningLevel>
|
||||||
|
|||||||
@@ -49,7 +49,7 @@
|
|||||||
<DebugSymbols>true</DebugSymbols>
|
<DebugSymbols>true</DebugSymbols>
|
||||||
<DebugType>full</DebugType>
|
<DebugType>full</DebugType>
|
||||||
<Optimize>false</Optimize>
|
<Optimize>false</Optimize>
|
||||||
<OutputPath>bin\Debug\DotNet35\</OutputPath>
|
<OutputPath>bin\Debug\Net35\</OutputPath>
|
||||||
<DefineConstants>TRACE;DEBUG;NET35</DefineConstants>
|
<DefineConstants>TRACE;DEBUG;NET35</DefineConstants>
|
||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<WarningLevel>4</WarningLevel>
|
<WarningLevel>4</WarningLevel>
|
||||||
@@ -58,7 +58,7 @@
|
|||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||||
<DebugType>pdbonly</DebugType>
|
<DebugType>pdbonly</DebugType>
|
||||||
<Optimize>true</Optimize>
|
<Optimize>true</Optimize>
|
||||||
<OutputPath>bin\Release\DotNet35\</OutputPath>
|
<OutputPath>bin\Release\Net35\</OutputPath>
|
||||||
<DefineConstants>TRACE;NET35</DefineConstants>
|
<DefineConstants>TRACE;NET35</DefineConstants>
|
||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<WarningLevel>4</WarningLevel>
|
<WarningLevel>4</WarningLevel>
|
||||||
|
|||||||
+6
-6
@@ -9,8 +9,8 @@
|
|||||||
<ProjectTypeGuids>{C089C8C0-30E0-4E22-80C0-CE093F111A43};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
|
<ProjectTypeGuids>{C089C8C0-30E0-4E22-80C0-CE093F111A43};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
|
||||||
<OutputType>Library</OutputType>
|
<OutputType>Library</OutputType>
|
||||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||||
<RootNamespace>Newtonsoft.Json.Tests.Phone</RootNamespace>
|
<RootNamespace>Newtonsoft.Json.Tests.WindowsPhone</RootNamespace>
|
||||||
<AssemblyName>Newtonsoft.Json.Tests.Phone</AssemblyName>
|
<AssemblyName>Newtonsoft.Json.Tests.WindowsPhone</AssemblyName>
|
||||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||||
<SilverlightVersion>$(TargetFrameworkVersion)</SilverlightVersion>
|
<SilverlightVersion>$(TargetFrameworkVersion)</SilverlightVersion>
|
||||||
<TargetFrameworkProfile>WindowsPhone</TargetFrameworkProfile>
|
<TargetFrameworkProfile>WindowsPhone</TargetFrameworkProfile>
|
||||||
@@ -23,7 +23,7 @@
|
|||||||
<DebugSymbols>true</DebugSymbols>
|
<DebugSymbols>true</DebugSymbols>
|
||||||
<DebugType>full</DebugType>
|
<DebugType>full</DebugType>
|
||||||
<Optimize>false</Optimize>
|
<Optimize>false</Optimize>
|
||||||
<OutputPath>Bin\Debug\Phone\</OutputPath>
|
<OutputPath>Bin\Debug\WindowsPhone\</OutputPath>
|
||||||
<DefineConstants>DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>
|
<DefineConstants>DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>
|
||||||
<NoStdLib>true</NoStdLib>
|
<NoStdLib>true</NoStdLib>
|
||||||
<NoConfig>true</NoConfig>
|
<NoConfig>true</NoConfig>
|
||||||
@@ -33,7 +33,7 @@
|
|||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||||
<DebugType>pdbonly</DebugType>
|
<DebugType>pdbonly</DebugType>
|
||||||
<Optimize>true</Optimize>
|
<Optimize>true</Optimize>
|
||||||
<OutputPath>Bin\Release\Phone\</OutputPath>
|
<OutputPath>Bin\Release\WindowsPhone\</OutputPath>
|
||||||
<DefineConstants>TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>
|
<DefineConstants>TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>
|
||||||
<NoStdLib>true</NoStdLib>
|
<NoStdLib>true</NoStdLib>
|
||||||
<NoConfig>true</NoConfig>
|
<NoConfig>true</NoConfig>
|
||||||
@@ -211,9 +211,9 @@
|
|||||||
<Compile Include="Utilities\ReflectionUtilsTests.cs" />
|
<Compile Include="Utilities\ReflectionUtilsTests.cs" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\Newtonsoft.Json\Newtonsoft.Json.Phone.csproj">
|
<ProjectReference Include="..\Newtonsoft.Json\Newtonsoft.Json.WindowsPhone.csproj">
|
||||||
<Project>{7A7F70AB-5C07-47ED-BDD2-ECC14DBACA5E}</Project>
|
<Project>{7A7F70AB-5C07-47ED-BDD2-ECC14DBACA5E}</Project>
|
||||||
<Name>Newtonsoft.Json.Phone</Name>
|
<Name>Newtonsoft.Json.WindowsPhone</Name>
|
||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildExtensionsPath)\Microsoft\Silverlight for Phone\$(TargetFrameworkVersion)\Microsoft.Silverlight.$(TargetFrameworkProfile).Overrides.targets" />
|
<Import Project="$(MSBuildExtensionsPath)\Microsoft\Silverlight for Phone\$(TargetFrameworkVersion)\Microsoft.Silverlight.$(TargetFrameworkProfile).Overrides.targets" />
|
||||||
@@ -49,7 +49,7 @@
|
|||||||
<DebugSymbols>true</DebugSymbols>
|
<DebugSymbols>true</DebugSymbols>
|
||||||
<DebugType>full</DebugType>
|
<DebugType>full</DebugType>
|
||||||
<Optimize>false</Optimize>
|
<Optimize>false</Optimize>
|
||||||
<OutputPath>bin\Debug\DotNet\</OutputPath>
|
<OutputPath>bin\Debug\Net\</OutputPath>
|
||||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<WarningLevel>4</WarningLevel>
|
<WarningLevel>4</WarningLevel>
|
||||||
@@ -58,7 +58,7 @@
|
|||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||||
<DebugType>pdbonly</DebugType>
|
<DebugType>pdbonly</DebugType>
|
||||||
<Optimize>true</Optimize>
|
<Optimize>true</Optimize>
|
||||||
<OutputPath>bin\Release\DotNet\</OutputPath>
|
<OutputPath>bin\Release\Net\</OutputPath>
|
||||||
<DefineConstants>TRACE</DefineConstants>
|
<DefineConstants>TRACE</DefineConstants>
|
||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<WarningLevel>4</WarningLevel>
|
<WarningLevel>4</WarningLevel>
|
||||||
|
|||||||
@@ -3665,5 +3665,37 @@ keyword such as type of business.""
|
|||||||
IDictionary<string, decimal> d = JsonConvert.DeserializeObject<IDictionary<string, decimal>>(json);
|
IDictionary<string, decimal> d = JsonConvert.DeserializeObject<IDictionary<string, decimal>>(json);
|
||||||
Assert.AreEqual(123456789876543.21m, d["Value"]);
|
Assert.AreEqual(123456789876543.21m, d["Value"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public struct Vector
|
||||||
|
{
|
||||||
|
public float X;
|
||||||
|
public float Y;
|
||||||
|
public float Z;
|
||||||
|
|
||||||
|
public override string ToString()
|
||||||
|
{
|
||||||
|
return string.Format("({0},{1},{2})", X, Y, Z);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public class VectorParent
|
||||||
|
{
|
||||||
|
public Vector Position;
|
||||||
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void DeserializeStructProperty()
|
||||||
|
{
|
||||||
|
VectorParent obj = new VectorParent();
|
||||||
|
obj.Position = new Vector { X = 1, Y = 2, Z = 3 };
|
||||||
|
|
||||||
|
string str = JsonConvert.SerializeObject(obj);
|
||||||
|
|
||||||
|
obj = JsonConvert.DeserializeObject<VectorParent>(str);
|
||||||
|
|
||||||
|
Assert.AreEqual(1, obj.Position.X);
|
||||||
|
Assert.AreEqual(2, obj.Position.Y);
|
||||||
|
Assert.AreEqual(3, obj.Position.Z);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -47,11 +47,11 @@
|
|||||||
<DebugSymbols>true</DebugSymbols>
|
<DebugSymbols>true</DebugSymbols>
|
||||||
<DebugType>full</DebugType>
|
<DebugType>full</DebugType>
|
||||||
<Optimize>false</Optimize>
|
<Optimize>false</Optimize>
|
||||||
<OutputPath>bin\Debug\DotNet20\</OutputPath>
|
<OutputPath>bin\Debug\Net20\</OutputPath>
|
||||||
<DefineConstants>TRACE;DEBUG;NET20</DefineConstants>
|
<DefineConstants>TRACE;DEBUG;NET20</DefineConstants>
|
||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<WarningLevel>4</WarningLevel>
|
<WarningLevel>4</WarningLevel>
|
||||||
<DocumentationFile>bin\Debug\DotNet20\Newtonsoft.Json.Net20.xml</DocumentationFile>
|
<DocumentationFile>bin\Debug\Net20\Newtonsoft.Json.Net20.xml</DocumentationFile>
|
||||||
<RunCodeAnalysis>true</RunCodeAnalysis>
|
<RunCodeAnalysis>true</RunCodeAnalysis>
|
||||||
<CodeAnalysisRules>
|
<CodeAnalysisRules>
|
||||||
</CodeAnalysisRules>
|
</CodeAnalysisRules>
|
||||||
@@ -60,11 +60,11 @@
|
|||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||||
<DebugType>pdbonly</DebugType>
|
<DebugType>pdbonly</DebugType>
|
||||||
<Optimize>true</Optimize>
|
<Optimize>true</Optimize>
|
||||||
<OutputPath>bin\Release\DotNet20\</OutputPath>
|
<OutputPath>bin\Release\Net20\</OutputPath>
|
||||||
<DefineConstants>TRACE;NET20</DefineConstants>
|
<DefineConstants>TRACE;NET20</DefineConstants>
|
||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<WarningLevel>4</WarningLevel>
|
<WarningLevel>4</WarningLevel>
|
||||||
<DocumentationFile>bin\Release\DotNet20\Newtonsoft.Json.Net20.xml</DocumentationFile>
|
<DocumentationFile>bin\Release\Net20\Newtonsoft.Json.Net20.xml</DocumentationFile>
|
||||||
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -48,11 +48,11 @@
|
|||||||
<DebugSymbols>true</DebugSymbols>
|
<DebugSymbols>true</DebugSymbols>
|
||||||
<DebugType>full</DebugType>
|
<DebugType>full</DebugType>
|
||||||
<Optimize>false</Optimize>
|
<Optimize>false</Optimize>
|
||||||
<OutputPath>bin\Debug\DotNet35\</OutputPath>
|
<OutputPath>bin\Debug\Net35\</OutputPath>
|
||||||
<DefineConstants>TRACE;DEBUG;CODE_ANALYSIS;NET35</DefineConstants>
|
<DefineConstants>TRACE;DEBUG;CODE_ANALYSIS;NET35</DefineConstants>
|
||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<WarningLevel>4</WarningLevel>
|
<WarningLevel>4</WarningLevel>
|
||||||
<DocumentationFile>bin\Debug\DotNet35\Newtonsoft.Json.Net35.xml</DocumentationFile>
|
<DocumentationFile>bin\Debug\Net35\Newtonsoft.Json.Net35.xml</DocumentationFile>
|
||||||
<RunCodeAnalysis>true</RunCodeAnalysis>
|
<RunCodeAnalysis>true</RunCodeAnalysis>
|
||||||
<CodeAnalysisRules>
|
<CodeAnalysisRules>
|
||||||
</CodeAnalysisRules>
|
</CodeAnalysisRules>
|
||||||
@@ -61,12 +61,12 @@
|
|||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||||
<DebugType>pdbonly</DebugType>
|
<DebugType>pdbonly</DebugType>
|
||||||
<Optimize>true</Optimize>
|
<Optimize>true</Optimize>
|
||||||
<OutputPath>bin\Release\DotNet35\</OutputPath>
|
<OutputPath>bin\Release\Net35\</OutputPath>
|
||||||
<DefineConstants>TRACE;NET35</DefineConstants>
|
<DefineConstants>TRACE;NET35</DefineConstants>
|
||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<WarningLevel>4</WarningLevel>
|
<WarningLevel>4</WarningLevel>
|
||||||
<DocumentationFile>bin\Release\DotNet35\Newtonsoft.Json.Net35.xml</DocumentationFile>
|
<DocumentationFile>bin\Release\Net35\Newtonsoft.Json.Net35.xml</DocumentationFile>
|
||||||
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
<CodeAnalysisRuleSet>..\..\..\..\trunk\Src\Newtonsoft.Json\Newtonsoft.Json.ruleset</CodeAnalysisRuleSet>
|
||||||
<RunCodeAnalysis>true</RunCodeAnalysis>
|
<RunCodeAnalysis>true</RunCodeAnalysis>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
+5
-5
@@ -9,8 +9,8 @@
|
|||||||
<ProjectTypeGuids>{C089C8C0-30E0-4E22-80C0-CE093F111A43};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
|
<ProjectTypeGuids>{C089C8C0-30E0-4E22-80C0-CE093F111A43};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
|
||||||
<OutputType>Library</OutputType>
|
<OutputType>Library</OutputType>
|
||||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||||
<RootNamespace>Newtonsoft.Json.Phone</RootNamespace>
|
<RootNamespace>Newtonsoft.Json.WindowsPhone</RootNamespace>
|
||||||
<AssemblyName>Newtonsoft.Json.Phone</AssemblyName>
|
<AssemblyName>Newtonsoft.Json.WindowsPhone</AssemblyName>
|
||||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||||
<SilverlightVersion>$(TargetFrameworkVersion)</SilverlightVersion>
|
<SilverlightVersion>$(TargetFrameworkVersion)</SilverlightVersion>
|
||||||
<TargetFrameworkProfile>WindowsPhone</TargetFrameworkProfile>
|
<TargetFrameworkProfile>WindowsPhone</TargetFrameworkProfile>
|
||||||
@@ -23,7 +23,7 @@
|
|||||||
<DebugSymbols>true</DebugSymbols>
|
<DebugSymbols>true</DebugSymbols>
|
||||||
<DebugType>full</DebugType>
|
<DebugType>full</DebugType>
|
||||||
<Optimize>false</Optimize>
|
<Optimize>false</Optimize>
|
||||||
<OutputPath>Bin\Debug\Phone\</OutputPath>
|
<OutputPath>Bin\Debug\WindowsPhone\</OutputPath>
|
||||||
<DefineConstants>DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>
|
<DefineConstants>DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>
|
||||||
<NoStdLib>true</NoStdLib>
|
<NoStdLib>true</NoStdLib>
|
||||||
<NoConfig>true</NoConfig>
|
<NoConfig>true</NoConfig>
|
||||||
@@ -35,13 +35,13 @@
|
|||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||||
<DebugType>pdbonly</DebugType>
|
<DebugType>pdbonly</DebugType>
|
||||||
<Optimize>true</Optimize>
|
<Optimize>true</Optimize>
|
||||||
<OutputPath>Bin\Release\Phone\</OutputPath>
|
<OutputPath>Bin\Release\WindowsPhone\</OutputPath>
|
||||||
<DefineConstants>TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>
|
<DefineConstants>TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>
|
||||||
<NoStdLib>true</NoStdLib>
|
<NoStdLib>true</NoStdLib>
|
||||||
<NoConfig>true</NoConfig>
|
<NoConfig>true</NoConfig>
|
||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<WarningLevel>4</WarningLevel>
|
<WarningLevel>4</WarningLevel>
|
||||||
<DocumentationFile>Bin\Release\Phone\Newtonsoft.Json.Phone.xml</DocumentationFile>
|
<DocumentationFile>Bin\Release\WindowsPhone\Newtonsoft.Json.WindowsPhone.xml</DocumentationFile>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="System.Runtime.Serialization" />
|
<Reference Include="System.Runtime.Serialization" />
|
||||||
@@ -48,11 +48,11 @@
|
|||||||
<DebugSymbols>true</DebugSymbols>
|
<DebugSymbols>true</DebugSymbols>
|
||||||
<DebugType>full</DebugType>
|
<DebugType>full</DebugType>
|
||||||
<Optimize>false</Optimize>
|
<Optimize>false</Optimize>
|
||||||
<OutputPath>bin\Debug\DotNet\</OutputPath>
|
<OutputPath>bin\Debug\Net\</OutputPath>
|
||||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<WarningLevel>4</WarningLevel>
|
<WarningLevel>4</WarningLevel>
|
||||||
<DocumentationFile>bin\Debug\DotNet\Newtonsoft.Json.xml</DocumentationFile>
|
<DocumentationFile>bin\Debug\Net\Newtonsoft.Json.xml</DocumentationFile>
|
||||||
<RunCodeAnalysis>true</RunCodeAnalysis>
|
<RunCodeAnalysis>true</RunCodeAnalysis>
|
||||||
<CodeAnalysisRules>
|
<CodeAnalysisRules>
|
||||||
</CodeAnalysisRules>
|
</CodeAnalysisRules>
|
||||||
@@ -61,11 +61,11 @@
|
|||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||||
<DebugType>pdbonly</DebugType>
|
<DebugType>pdbonly</DebugType>
|
||||||
<Optimize>true</Optimize>
|
<Optimize>true</Optimize>
|
||||||
<OutputPath>bin\Release\DotNet\</OutputPath>
|
<OutputPath>bin\Release\Net\</OutputPath>
|
||||||
<DefineConstants>TRACE</DefineConstants>
|
<DefineConstants>TRACE</DefineConstants>
|
||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<WarningLevel>4</WarningLevel>
|
<WarningLevel>4</WarningLevel>
|
||||||
<DocumentationFile>bin\Release\DotNet\Newtonsoft.Json.xml</DocumentationFile>
|
<DocumentationFile>bin\Release\Net\Newtonsoft.Json.xml</DocumentationFile>
|
||||||
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -26,7 +26,9 @@ using System.Security;
|
|||||||
// General Information about an assembly is controlled through the following
|
// General Information about an assembly is controlled through the following
|
||||||
// set of attributes. Change these attribute values to modify the information
|
// set of attributes. Change these attribute values to modify the information
|
||||||
// associated with an assembly.
|
// associated with an assembly.
|
||||||
#if SILVERLIGHT
|
#if WINDOWS_PHONE
|
||||||
|
[assembly: AssemblyTitle("Newtonsoft Json.NET Windows Phone")]
|
||||||
|
#elif SILVERLIGHT
|
||||||
[assembly: AssemblyTitle("Newtonsoft Json.NET Silverlight")]
|
[assembly: AssemblyTitle("Newtonsoft Json.NET Silverlight")]
|
||||||
#elif PocketPC
|
#elif PocketPC
|
||||||
[assembly: AssemblyTitle("Newtonsoft Json.NET Compact")]
|
[assembly: AssemblyTitle("Newtonsoft Json.NET Compact")]
|
||||||
@@ -44,7 +46,7 @@ using System.Security;
|
|||||||
#if !SIGNED
|
#if !SIGNED
|
||||||
|
|
||||||
#if WINDOWS_PHONE
|
#if WINDOWS_PHONE
|
||||||
[assembly: InternalsVisibleTo("Newtonsoft.Json.Tests.Phone")]
|
[assembly: InternalsVisibleTo("Newtonsoft.Json.Tests.WindowsPhone")]
|
||||||
#elif SILVERLIGHT
|
#elif SILVERLIGHT
|
||||||
[assembly: InternalsVisibleTo("Newtonsoft.Json.Tests.Silverlight")]
|
[assembly: InternalsVisibleTo("Newtonsoft.Json.Tests.Silverlight")]
|
||||||
#elif PocketPC
|
#elif PocketPC
|
||||||
|
|||||||
@@ -516,7 +516,10 @@ namespace Newtonsoft.Json.Serialization
|
|||||||
currentValue = property.ValueProvider.GetValue(target);
|
currentValue = property.ValueProvider.GetValue(target);
|
||||||
gottenCurrentValue = true;
|
gottenCurrentValue = true;
|
||||||
|
|
||||||
useExistingValue = (currentValue != null && !property.PropertyType.IsArray && !ReflectionUtils.InheritsGenericDefinition(property.PropertyType, typeof(ReadOnlyCollection<>)));
|
useExistingValue = (currentValue != null
|
||||||
|
&& !property.PropertyType.IsArray
|
||||||
|
&& !ReflectionUtils.InheritsGenericDefinition(property.PropertyType, typeof(ReadOnlyCollection<>))
|
||||||
|
&& !property.PropertyType.IsValueType);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!property.Writable && !useExistingValue)
|
if (!property.Writable && !useExistingValue)
|
||||||
|
|||||||
Binary file not shown.
Reference in New Issue
Block a user