Skip to content
Browse files

Initial commit

  • Loading branch information...
0 parents commit d509269f33a86cdb7905519569e29f089ce2fa22 @grumpydev grumpydev committed Oct 18, 2011
Showing with 1,159 additions and 0 deletions.
  1. +18 −0 .gitignore
  2. +3 −0 .gitmodules
  3. +1 −0 dependencies/Nancy
  4. +144 −0 rakefile.rb
  5. +112 −0 src/Nancy.Serializers.Json.ServiceStack/Demo/Demo.csproj
  6. +19 −0 src/Nancy.Serializers.Json.ServiceStack/Demo/DemoBootstrapper.cs
  7. +61 −0 src/Nancy.Serializers.Json.ServiceStack/Demo/DemoModule.cs
  8. +35 −0 src/Nancy.Serializers.Json.ServiceStack/Demo/Properties/AssemblyInfo.cs
  9. +32 −0 src/Nancy.Serializers.Json.ServiceStack/Demo/Views/Index.sshtml
  10. +30 −0 src/Nancy.Serializers.Json.ServiceStack/Demo/Web.Debug.config
  11. +31 −0 src/Nancy.Serializers.Json.ServiceStack/Demo/Web.Release.config
  12. +24 −0 src/Nancy.Serializers.Json.ServiceStack/Demo/Web.config
  13. +56 −0 src/Nancy.Serializers.Json.ServiceStack/Nancy.Serializers.Json.ServiceStack.sln
  14. +32 −0 src/Nancy.Serializers.Json.ServiceStack/Nancy.Serializers.Json.ServiceStack/Helpers.cs
  15. +68 −0 ....Json.ServiceStack/Nancy.Serializers.Json.ServiceStack/Nancy.Serializers.Json.ServiceStack.csproj
  16. +36 −0 ...ancy.Serializers.Json.ServiceStack/Nancy.Serializers.Json.ServiceStack/Properties/AssemblyInfo.cs
  17. +48 −0 ...Serializers.Json.ServiceStack/Nancy.Serializers.Json.ServiceStack/ServiceStackBodyDeserializer.cs
  18. +20 −0 ...y.Serializers.Json.ServiceStack/Nancy.Serializers.Json.ServiceStack/ServiceStackJsonSerializer.cs
  19. +26 −0 ....Json.ServiceStack/Nancy.Serializers.Json.ServiceStack/nancy.serializers.json.servicestack.nuspec
  20. +4 −0 src/Nancy.Serializers.Json.ServiceStack/Nancy.Serializers.Json.ServiceStack/packages.config
  21. BIN src/Nancy.Serializers.Json.ServiceStack/packages/ServiceStack.Text.2.26/ServiceStack.Text.2.26.nupkg
  22. +340 −0 ...ncy.Serializers.Json.ServiceStack/packages/ServiceStack.Text.2.26/lib/net35/ServiceStack.Text.XML
  23. BIN ...ncy.Serializers.Json.ServiceStack/packages/ServiceStack.Text.2.26/lib/net35/ServiceStack.Text.dll
  24. BIN ...ncy.Serializers.Json.ServiceStack/packages/ServiceStack.Text.2.26/lib/net35/ServiceStack.Text.pdb
  25. +15 −0 src/Nancy.Serializers.Json.ServiceStack/packages/ServiceStack.Text.2.26/servicestack.text.nuget
  26. +4 −0 src/Nancy.Serializers.Json.ServiceStack/packages/repositories.config
  27. BIN tools/nuget/NuGet.exe
18 .gitignore
@@ -0,0 +1,18 @@
+*.[Cc]ache
+*.csproj.user
+*.[Rr]e[Ss]harper*
+*.sln.cache
+*.suo
+*.user
+*.orig
+*.pidb
+*.userprefs
+.DS_Store
+deploy/
+build/
+[Bb]in/
+[Dd]ebug/
+[Oo]bj/
+[Rr]elease/
+_[Rr]e[Ss]harper.*/
+*.tss
3 .gitmodules
@@ -0,0 +1,3 @@
+[submodule "dependencies/Nancy"]
+ path = dependencies/Nancy
+ url = https://github.com/NancyFx/Nancy.git
1 dependencies/Nancy
@@ -0,0 +1 @@
+Subproject commit 73663dbb4f7b23d4c22a2722dc180012a35b2543
144 rakefile.rb
@@ -0,0 +1,144 @@
+# encoding: utf-8
+require 'rubygems'
+require 'albacore'
+require 'rake/clean'
+require 'rexml/document'
+
+NANCY_VERSION = ""
+OUTPUT = "build"
+CONFIGURATION = 'Release'
+SHARED_ASSEMBLY_INFO = 'dependencies/Nancy/src/SharedAssemblyInfo.cs'
+SOLUTION_FILE = 'src/Nancy.Serializers.Json.ServiceStack/Nancy.Serializers.Json.ServiceStack.sln'
+
+Albacore.configure do |config|
+ config.log_level = :verbose
+ config.msbuild.use :net4
+ config.xunit.command = "dependencies/Nancy/tools/xunit/xunit.console.clr4.x86.exe"
+end
+
+desc "Compiles solution and runs unit tests"
+task :default => [:clean, :version, :compile, :publish, :package]
+
+#Add the folders that should be cleaned as part of the clean task
+CLEAN.include(OUTPUT)
+CLEAN.include(FileList["src/**/#{CONFIGURATION}"])
+
+desc "Update shared assemblyinfo file for the build"
+assemblyinfo :version => [:clean] do |asm|
+ NANCY_VERSION = get_assembly_version SHARED_ASSEMBLY_INFO
+
+ asm.version = NANCY_VERSION
+ asm.company_name = "Nancy"
+ asm.product_name = "Nancy.Serializers.Json.ServiceStack"
+ asm.title = "Nancy.Serializers.Json.ServiceStack"
+ asm.description = "Provides JSON (de)serialization support using ServiceStack.Text."
+ asm.copyright = "Copyright (C) Andreas Hakansson, Steven Robbins and contributors"
+ asm.output_file = SHARED_ASSEMBLY_INFO
+end
+
+desc "Compile solution file"
+msbuild :compile => [:version] do |msb|
+ msb.properties :configuration => CONFIGURATION
+ msb.targets :Clean, :Build
+ msb.solution = SOLUTION_FILE
+end
+
+desc "Gathers output files and copies them to the output folder"
+task :publish => [:compile] do
+ Dir.mkdir(OUTPUT)
+ Dir.mkdir("#{OUTPUT}/binaries")
+
+ FileUtils.cp_r FileList["src/**/#{CONFIGURATION}/*.dll", "src/**/#{CONFIGURATION}/*.pdb"].exclude(/obj\//).exclude(/.Tests/), "#{OUTPUT}/binaries"
+end
+
+desc "Zips up the built binaries for easy distribution"
+zip :package => [:publish] do |zip|
+ Dir.mkdir("#{OUTPUT}/packages")
+
+ zip.directories_to_zip "#{OUTPUT}/binaries"
+ zip.output_file = "Nancy.Serializers.Json.ServiceStack-Latest.zip"
+ zip.output_path = "#{OUTPUT}/packages"
+end
+
+desc "Generates NuGet packages for each project that contains a nuspec"
+task :nuget_package => [:publish] do
+ Dir.mkdir("#{OUTPUT}/nuget")
+ nuspecs = FileList["src/Nancy.Serializers.Json.ServiceStack/Nancy.Serializers.Json.ServiceStack/*.nuspec"]
+ root = File.dirname(__FILE__)
+
+ # Copy all project *.nuspec to nuget build folder before editing
+ FileUtils.cp_r nuspecs, "#{OUTPUT}/nuget"
+ nuspecs = FileList["#{OUTPUT}/nuget/nancy.bootstrappers.unity.nuspec"]
+
+ # Update the copied *.nuspec files to correct version numbers and other common values
+ nuspecs.each do |nuspec|
+ update_xml nuspec do |xml|
+ # Override the version number in the nuspec file with the one from this rake file (set above)
+ xml.root.elements["metadata/version"].text = NANCY_VERSION
+
+ # Override the Nancy dependencies to match this version
+ nancy_dependencies = xml.root.elements["metadata/dependencies/dependency[contains(@id,'Nancy')]"]
+ nancy_dependencies.attributes["version"] = "[#{NANCY_VERSION}]" unless nancy_dependencies.nil?
+
+ # Override common values
+ xml.root.elements["metadata/authors"].text = "Andreas Håkansson, Steven Robbins and contributors"
+ xml.root.elements["metadata/summary"].text = "Nancy is a lightweight web framework for the .Net platform, inspired by Sinatra. Nancy aim at delivering a low ceremony approach to building light, fast web applications."
+ xml.root.elements["metadata/licenseUrl"].text = "https://github.com/NancyFx/Nancy.Serializers.Json.ServiceStack/blob/master/license.txt"
+ xml.root.elements["metadata/projectUrl"].text = "http://nancyfx.org"
+ end
+ end
+
+ # Generate the NuGet packages from the newly edited nuspec fileiles
+ nuspecs.each do |nuspec|
+ nuget = NuGetPack.new
+ nuget.command = "dependencies/Nancy/tools/nuget/nuget.exe"
+ nuget.nuspec = "\"" + root + '/' + nuspec + "\""
+ nuget.output = "#{OUTPUT}/nuget"
+ nuget.parameters = "-Symbols", "-BasePath \"#{root}\"" #using base_folder throws as there are two options that begin with b in nuget 1.4
+ nuget.execute
+ end
+end
+
+desc "Pushes the nuget packages in the nuget folder up to the nuget gallary and symbolsource.org. Also publishes the packages into the feeds."
+task :nuget_publish do
+ nupkgs = FileList["#{OUTPUT}/nuget/*#{NANCY_VERSION}.nupkg"]
+ nupkgs.each do |nupkg|
+ puts "Pushing #{nupkg}"
+ nuget_push = NuGetPush.new
+ nuget_push.command = "dependencies/Nancy/tools/nuget/nuget.exe"
+ nuget_push.package = "\"" + nupkg + "\""
+ nuget_push.create_only = false
+ nuget_push.execute
+ end
+end
+
+def update_xml(xml_path)
+ #Open up the xml file
+ xml_file = File.new(xml_path)
+ xml = REXML::Document.new xml_file
+
+ #Allow caller to make the changes
+ yield xml
+
+ xml_file.close
+
+ #Save the changes
+ xml_file = File.open(xml_path, "w")
+ formatter = REXML::Formatters::Default.new(5)
+ formatter.write(xml, xml_file)
+ xml_file.close
+end
+
+def get_assembly_version(file)
+ return '' if file.nil?
+
+ File.open(file, 'r') do |file|
+ file.each_line do |line|
+ result = /\[assembly: AssemblyVersion\(\"(.*?)\"\)\]/.match(line)
+
+ return result[1] if !result.nil?
+ end
+ end
+
+ return ''
+end
112 src/Nancy.Serializers.Json.ServiceStack/Demo/Demo.csproj
@@ -0,0 +1,112 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>
+ </ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{39E172B4-AE7F-4981-9204-3F42FC2F7F19}</ProjectGuid>
+ <ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>Demo</RootNamespace>
+ <AssemblyName>Demo</AssemblyName>
+ <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+ <UseIISExpress>false</UseIISExpress>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>bin\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="Microsoft.CSharp" />
+ <Reference Include="System.Web.DynamicData" />
+ <Reference Include="System.Web.Entity" />
+ <Reference Include="System.Web.ApplicationServices" />
+ <Reference Include="System" />
+ <Reference Include="System.Data" />
+ <Reference Include="System.Core" />
+ <Reference Include="System.Data.DataSetExtensions" />
+ <Reference Include="System.Web.Extensions" />
+ <Reference Include="System.Xml.Linq" />
+ <Reference Include="System.Drawing" />
+ <Reference Include="System.Web" />
+ <Reference Include="System.Xml" />
+ <Reference Include="System.Configuration" />
+ <Reference Include="System.Web.Services" />
+ <Reference Include="System.EnterpriseServices" />
+ </ItemGroup>
+ <ItemGroup>
+ <Content Include="Web.config" />
+ <Content Include="Web.Debug.config">
+ <DependentUpon>Web.config</DependentUpon>
+ </Content>
+ <Content Include="Web.Release.config">
+ <DependentUpon>Web.config</DependentUpon>
+ </Content>
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="DemoBootstrapper.cs" />
+ <Compile Include="DemoModule.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\..\dependencies\Nancy\src\Nancy.Hosting.Aspnet\Nancy.Hosting.Aspnet.csproj">
+ <Project>{15B7F794-0BB2-4B66-AD78-4A951F1209B2}</Project>
+ <Name>Nancy.Hosting.Aspnet</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\dependencies\Nancy\src\Nancy\Nancy.csproj">
+ <Project>{34576216-0DCA-4B0F-A0DC-9075E75A676F}</Project>
+ <Name>Nancy</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\Nancy.Serializers.Json.ServiceStack\Nancy.Serializers.Json.ServiceStack.csproj">
+ <Project>{9969B6CD-C19D-435F-A280-147331CCAF18}</Project>
+ <Name>Nancy.Serializers.Json.ServiceStack</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="Views\Index.sshtml" />
+ </ItemGroup>
+ <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+ <Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" />
+ <ProjectExtensions>
+ <VisualStudio>
+ <FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
+ <WebProjectProperties>
+ <UseIIS>False</UseIIS>
+ <AutoAssignPort>True</AutoAssignPort>
+ <DevelopmentServerPort>54255</DevelopmentServerPort>
+ <DevelopmentServerVPath>/</DevelopmentServerVPath>
+ <IISUrl>
+ </IISUrl>
+ <NTLMAuthentication>False</NTLMAuthentication>
+ <UseCustomServer>False</UseCustomServer>
+ <CustomServerUrl>
+ </CustomServerUrl>
+ <SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
+ </WebProjectProperties>
+ </FlavorProperties>
+ </VisualStudio>
+ </ProjectExtensions>
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project>
19 src/Nancy.Serializers.Json.ServiceStack/Demo/DemoBootstrapper.cs
@@ -0,0 +1,19 @@
+namespace Demo
+{
+ using Nancy;
+ using Nancy.Bootstrapper;
+ using Nancy.Serializers.Json.ServiceStack;
+
+ public class DemoBootstrapper : DefaultNancyBootstrapper
+ {
+ protected override NancyInternalConfiguration InternalConfiguration
+ {
+ get
+ {
+ // Insert at position 0 so it takes precedence over the built in one.
+ return NancyInternalConfiguration.WithOverrides(
+ c => c.Serializers.Insert(0, typeof(ServiceStackJsonSerializer)));
+ }
+ }
+ }
+}
61 src/Nancy.Serializers.Json.ServiceStack/Demo/DemoModule.cs
@@ -0,0 +1,61 @@
+namespace Demo
+{
+ using Nancy;
+ using Nancy.ModelBinding;
+
+ public class DemoModule : NancyModule
+ {
+ public DemoModule()
+ {
+ Get["/"] = _ => View["index"];
+
+ Get["/json"] = _ =>
+ {
+ var model = new[]
+ {
+ new DemoModel
+ {
+ Id = 1,
+ Name = "Fenella",
+ Age = 87,
+ Location = "Spout Hall"
+ },
+ new DemoModel
+ {
+ Id = 2,
+ Name = "Chorlton",
+ Age = 2,
+ Location = "Wheelie World"
+ },
+ };
+
+ return Response.AsJson(model);
+ };
+
+ Post["/json/{id}"] = x =>
+ {
+ DemoModel model = this.Bind("Id");
+
+ model.Id = x.id;
+
+ return model.ToString();
+ };
+ }
+ }
+
+ public class DemoModel
+ {
+ public int Id { get; set; }
+
+ public string Name { get; set; }
+
+ public int Age { get; set; }
+
+ public string Location { get; set; }
+
+ public override string ToString()
+ {
+ return string.Format("Id: {0}, Name: {1}, Age: {2}, Location: {3}", this.Id, this.Name, this.Age, this.Location);
+ }
+ }
+}
35 src/Nancy.Serializers.Json.ServiceStack/Demo/Properties/AssemblyInfo.cs
@@ -0,0 +1,35 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("Demo")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("Microsoft")]
+[assembly: AssemblyProduct("Demo")]
+[assembly: AssemblyCopyright("Copyright © Microsoft 2011")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("f3330697-528a-4d40-b2d2-9e09e5ba24ab")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Revision and Build Numbers
+// by using the '*' as shown below:
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
32 src/Nancy.Serializers.Json.ServiceStack/Demo/Views/Index.sshtml
@@ -0,0 +1,32 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <title>Nancy.Serializers.Json.ServiceStack Demo</title>
+
+ <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
+
+ <script type="text/javascript">
+ function postJson()
+ {
+ /* Naughty over posting */
+ var dat = "{\"Id\":1,\"Name\":\"Fenella\",\"Age\":87,\"Location\":\"Spout Hall\"}";
+
+ alert("POSTing the following data to /json/2:\n\n" + dat);
+
+ $.ajax({
+ type: "POST",
+ url: "/json/2",
+ contentType: "application/json",
+ data: dat,
+ success: function (data) {
+ alert("Response:\n" + data);
+ }
+ });
+ }
+ </script>
+</head>
+<body>
+ <a href="@Path['~/json'];">Get me some JSON</a></br>
+ <input type="button" value="Post me some JSON" onclick="postJson();"/>
+</body>
+</html>
30 src/Nancy.Serializers.Json.ServiceStack/Demo/Web.Debug.config
@@ -0,0 +1,30 @@
+<?xml version="1.0"?>
+
+<!-- For more information on using web.config transformation visit http://go.microsoft.com/fwlink/?LinkId=125889 -->
+
+<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
+ <!--
+ In the example below, the "SetAttributes" transform will change the value of
+ "connectionString" to use "ReleaseSQLServer" only when the "Match" locator
+ finds an atrribute "name" that has a value of "MyDB".
+
+ <connectionStrings>
+ <add name="MyDB"
+ connectionString="Data Source=ReleaseSQLServer;Initial Catalog=MyReleaseDB;Integrated Security=True"
+ xdt:Transform="SetAttributes" xdt:Locator="Match(name)"/>
+ </connectionStrings>
+ -->
+ <system.web>
+ <!--
+ In the example below, the "Replace" transform will replace the entire
+ <customErrors> section of your web.config file.
+ Note that because there is only one customErrors section under the
+ <system.web> node, there is no need to use the "xdt:Locator" attribute.
+
+ <customErrors defaultRedirect="GenericError.htm"
+ mode="RemoteOnly" xdt:Transform="Replace">
+ <error statusCode="500" redirect="InternalError.htm"/>
+ </customErrors>
+ -->
+ </system.web>
+</configuration>
31 src/Nancy.Serializers.Json.ServiceStack/Demo/Web.Release.config
@@ -0,0 +1,31 @@
+<?xml version="1.0"?>
+
+<!-- For more information on using web.config transformation visit http://go.microsoft.com/fwlink/?LinkId=125889 -->
+
+<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
+ <!--
+ In the example below, the "SetAttributes" transform will change the value of
+ "connectionString" to use "ReleaseSQLServer" only when the "Match" locator
+ finds an atrribute "name" that has a value of "MyDB".
+
+ <connectionStrings>
+ <add name="MyDB"
+ connectionString="Data Source=ReleaseSQLServer;Initial Catalog=MyReleaseDB;Integrated Security=True"
+ xdt:Transform="SetAttributes" xdt:Locator="Match(name)"/>
+ </connectionStrings>
+ -->
+ <system.web>
+ <compilation xdt:Transform="RemoveAttributes(debug)" />
+ <!--
+ In the example below, the "Replace" transform will replace the entire
+ <customErrors> section of your web.config file.
+ Note that because there is only one customErrors section under the
+ <system.web> node, there is no need to use the "xdt:Locator" attribute.
+
+ <customErrors defaultRedirect="GenericError.htm"
+ mode="RemoteOnly" xdt:Transform="Replace">
+ <error statusCode="500" redirect="InternalError.htm"/>
+ </customErrors>
+ -->
+ </system.web>
+</configuration>
24 src/Nancy.Serializers.Json.ServiceStack/Demo/Web.config
@@ -0,0 +1,24 @@
+<?xml version="1.0"?>
+
+<!--
+ For more information on how to configure your ASP.NET application, please visit
+ http://go.microsoft.com/fwlink/?LinkId=169433
+ -->
+
+<configuration>
+ <system.web>
+ <compilation debug="true" targetFramework="4.0" />
+ <httpHandlers>
+ <add verb="*" type="Nancy.Hosting.Aspnet.NancyHttpRequestHandler" path="*"/>
+ </httpHandlers>
+ </system.web>
+
+ <system.webServer>
+ <modules runAllManagedModulesForAllRequests="true"/>
+ <validation validateIntegratedModeConfiguration="false"/>
+ <handlers>
+ <add name="Nancy" verb="*" type="Nancy.Hosting.Aspnet.NancyHttpRequestHandler" path="*"/>
+ </handlers>
+ </system.webServer>
+
+</configuration>
56 src/Nancy.Serializers.Json.ServiceStack/Nancy.Serializers.Json.ServiceStack.sln
@@ -0,0 +1,56 @@
+
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual Studio 2010
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Nancy.Serializers.Json.ServiceStack", "Nancy.Serializers.Json.ServiceStack\Nancy.Serializers.Json.ServiceStack.csproj", "{9969B6CD-C19D-435F-A280-147331CCAF18}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Demo", "Demo\Demo.csproj", "{39E172B4-AE7F-4981-9204-3F42FC2F7F19}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Nancy", "..\..\dependencies\Nancy\src\Nancy\Nancy.csproj", "{34576216-0DCA-4B0F-A0DC-9075E75A676F}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Nancy.Hosting.Aspnet", "..\..\dependencies\Nancy\src\Nancy.Hosting.Aspnet\Nancy.Hosting.Aspnet.csproj", "{15B7F794-0BB2-4B66-AD78-4A951F1209B2}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ MonoDebug|Any CPU = MonoDebug|Any CPU
+ MonoRelease|Any CPU = MonoRelease|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {9969B6CD-C19D-435F-A280-147331CCAF18}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {9969B6CD-C19D-435F-A280-147331CCAF18}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {9969B6CD-C19D-435F-A280-147331CCAF18}.MonoDebug|Any CPU.ActiveCfg = Debug|Any CPU
+ {9969B6CD-C19D-435F-A280-147331CCAF18}.MonoDebug|Any CPU.Build.0 = Debug|Any CPU
+ {9969B6CD-C19D-435F-A280-147331CCAF18}.MonoRelease|Any CPU.ActiveCfg = Release|Any CPU
+ {9969B6CD-C19D-435F-A280-147331CCAF18}.MonoRelease|Any CPU.Build.0 = Release|Any CPU
+ {9969B6CD-C19D-435F-A280-147331CCAF18}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {9969B6CD-C19D-435F-A280-147331CCAF18}.Release|Any CPU.Build.0 = Release|Any CPU
+ {39E172B4-AE7F-4981-9204-3F42FC2F7F19}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {39E172B4-AE7F-4981-9204-3F42FC2F7F19}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {39E172B4-AE7F-4981-9204-3F42FC2F7F19}.MonoDebug|Any CPU.ActiveCfg = Debug|Any CPU
+ {39E172B4-AE7F-4981-9204-3F42FC2F7F19}.MonoDebug|Any CPU.Build.0 = Debug|Any CPU
+ {39E172B4-AE7F-4981-9204-3F42FC2F7F19}.MonoRelease|Any CPU.ActiveCfg = Release|Any CPU
+ {39E172B4-AE7F-4981-9204-3F42FC2F7F19}.MonoRelease|Any CPU.Build.0 = Release|Any CPU
+ {39E172B4-AE7F-4981-9204-3F42FC2F7F19}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {39E172B4-AE7F-4981-9204-3F42FC2F7F19}.Release|Any CPU.Build.0 = Release|Any CPU
+ {34576216-0DCA-4B0F-A0DC-9075E75A676F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {34576216-0DCA-4B0F-A0DC-9075E75A676F}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {34576216-0DCA-4B0F-A0DC-9075E75A676F}.MonoDebug|Any CPU.ActiveCfg = MonoDebug|Any CPU
+ {34576216-0DCA-4B0F-A0DC-9075E75A676F}.MonoDebug|Any CPU.Build.0 = MonoDebug|Any CPU
+ {34576216-0DCA-4B0F-A0DC-9075E75A676F}.MonoRelease|Any CPU.ActiveCfg = MonoRelease|Any CPU
+ {34576216-0DCA-4B0F-A0DC-9075E75A676F}.MonoRelease|Any CPU.Build.0 = MonoRelease|Any CPU
+ {34576216-0DCA-4B0F-A0DC-9075E75A676F}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {34576216-0DCA-4B0F-A0DC-9075E75A676F}.Release|Any CPU.Build.0 = Release|Any CPU
+ {15B7F794-0BB2-4B66-AD78-4A951F1209B2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {15B7F794-0BB2-4B66-AD78-4A951F1209B2}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {15B7F794-0BB2-4B66-AD78-4A951F1209B2}.MonoDebug|Any CPU.ActiveCfg = MonoDebug|Any CPU
+ {15B7F794-0BB2-4B66-AD78-4A951F1209B2}.MonoDebug|Any CPU.Build.0 = MonoDebug|Any CPU
+ {15B7F794-0BB2-4B66-AD78-4A951F1209B2}.MonoRelease|Any CPU.ActiveCfg = MonoRelease|Any CPU
+ {15B7F794-0BB2-4B66-AD78-4A951F1209B2}.MonoRelease|Any CPU.Build.0 = MonoRelease|Any CPU
+ {15B7F794-0BB2-4B66-AD78-4A951F1209B2}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {15B7F794-0BB2-4B66-AD78-4A951F1209B2}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
32 src/Nancy.Serializers.Json.ServiceStack/Nancy.Serializers.Json.ServiceStack/Helpers.cs
@@ -0,0 +1,32 @@
+namespace Nancy.Serializers.Json.ServiceStack
+{
+ using System;
+
+ internal static class Helpers
+ {
+ /// <summary>
+ /// Attempts to detect if the content type is JSON.
+ /// Supports:
+ /// application/json
+ /// text/json
+ /// application/vnd[something]+json
+ /// Matches are case insentitive to try and be as "accepting" as possible.
+ /// </summary>
+ /// <param name="contentType">Request content type</param>
+ /// <returns>True if content type is JSON, false otherwise</returns>
+ public static bool IsJsonType(string contentType)
+ {
+ if (string.IsNullOrEmpty(contentType))
+ {
+ return false;
+ }
+
+ var contentMimeType = contentType.Split(';')[0];
+
+ return contentMimeType.Equals("application/json", StringComparison.InvariantCultureIgnoreCase) ||
+ contentMimeType.Equals("text/json", StringComparison.InvariantCultureIgnoreCase) ||
+ (contentMimeType.StartsWith("application/vnd", StringComparison.InvariantCultureIgnoreCase) &&
+ contentMimeType.EndsWith("+json", StringComparison.InvariantCultureIgnoreCase));
+ }
+ }
+}
68 ...rviceStack/Nancy.Serializers.Json.ServiceStack/Nancy.Serializers.Json.ServiceStack.csproj
@@ -0,0 +1,68 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>8.0.30703</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{9969B6CD-C19D-435F-A280-147331CCAF18}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>Nancy.Serializers.Json.ServiceStack</RootNamespace>
+ <AssemblyName>Nancy.Serializers.Json.ServiceStack</AssemblyName>
+ <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+ <FileAlignment>512</FileAlignment>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>bin\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="ServiceStack.Text">
+ <HintPath>..\packages\ServiceStack.Text.2.26\lib\net35\ServiceStack.Text.dll</HintPath>
+ </Reference>
+ <Reference Include="System" />
+ <Reference Include="System.Core" />
+ <Reference Include="System.Xml.Linq" />
+ <Reference Include="System.Data.DataSetExtensions" />
+ <Reference Include="Microsoft.CSharp" />
+ <Reference Include="System.Data" />
+ <Reference Include="System.Xml" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="Helpers.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ <Compile Include="ServiceStackBodyDeserializer.cs" />
+ <Compile Include="ServiceStackJsonSerializer.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="packages.config" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\..\dependencies\Nancy\src\Nancy\Nancy.csproj">
+ <Project>{34576216-0DCA-4B0F-A0DC-9075E75A676F}</Project>
+ <Name>Nancy</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project>
36 ...ializers.Json.ServiceStack/Nancy.Serializers.Json.ServiceStack/Properties/AssemblyInfo.cs
@@ -0,0 +1,36 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("Nancy.Serializers.Json.ServiceStack")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("Microsoft")]
+[assembly: AssemblyProduct("Nancy.Serializers.Json.ServiceStack")]
+[assembly: AssemblyCopyright("Copyright © Microsoft 2011")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("47d83e42-9310-476d-bf65-30c14d61a625")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
48 ...ers.Json.ServiceStack/Nancy.Serializers.Json.ServiceStack/ServiceStackBodyDeserializer.cs
@@ -0,0 +1,48 @@
+namespace Nancy.Serializers.Json.ServiceStack
+{
+ using System;
+ using System.IO;
+ using System.Linq;
+ using System.Reflection;
+
+ using Nancy.ModelBinding;
+
+ using global::ServiceStack.Text;
+
+ public class ServiceStackBodyDeserializer : IBodyDeserializer
+ {
+ public bool CanDeserialize(string contentType)
+ {
+ return Helpers.IsJsonType(contentType);
+ }
+
+ public object Deserialize(string contentType, Stream bodyStream, BindingContext context)
+ {
+ var deserializedObject = JsonSerializer.DeserializeFromStream(context.DestinationType, bodyStream);
+
+ if (context.DestinationType.GetProperties(BindingFlags.Public | BindingFlags.Instance).Except(context.ValidModelProperties).Any())
+ {
+ return this.CreateObjectWithBlacklistExcluded(context, deserializedObject);
+ }
+
+ return deserializedObject;
+ }
+
+ private object CreateObjectWithBlacklistExcluded(BindingContext context, object deserializedObject)
+ {
+ var returnObject = Activator.CreateInstance(context.DestinationType);
+
+ foreach (var property in context.ValidModelProperties)
+ {
+ this.CopyPropertyValue(property, deserializedObject, returnObject);
+ }
+
+ return returnObject;
+ }
+
+ private void CopyPropertyValue(PropertyInfo property, object sourceObject, object destinationObject)
+ {
+ property.SetValue(destinationObject, property.GetValue(sourceObject, null), null);
+ }
+ }
+}
20 ...izers.Json.ServiceStack/Nancy.Serializers.Json.ServiceStack/ServiceStackJsonSerializer.cs
@@ -0,0 +1,20 @@
+namespace Nancy.Serializers.Json.ServiceStack
+{
+ using System;
+ using System.IO;
+
+ using global::ServiceStack.Text;
+
+ public class ServiceStackJsonSerializer : ISerializer
+ {
+ public bool CanSerialize(string contentType)
+ {
+ return Helpers.IsJsonType(contentType);
+ }
+
+ public void Serialize<TModel>(string contentType, TModel model, Stream outputStream)
+ {
+ JsonSerializer.SerializeToStream(model, outputStream);
+ }
+ }
+}
26 ...rviceStack/Nancy.Serializers.Json.ServiceStack/nancy.serializers.json.servicestack.nuspec
@@ -0,0 +1,26 @@
+<?xml version="1.0"?>
+<package xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+ <metadata xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
+ <id>Nancy.Serializers.Json.ServiceStack</id>
+ <version>0.6.0</version> <!-- Overridden by rake nuget task but a default is required in nuspec files -->
+ <authors>Andreas Håkansson, Steven Robbins and contributors</authors>
+ <requireLicenseAcceptance>false</requireLicenseAcceptance>
+ <description>Provides JSON (de)serialization support using ServiceStack.Text.</description>
+ <summary>Nancy is a lightweight web framework for the .Net platform, inspired by Sinatra. Nancy aim at delivering a low ceremony approach to building light, fast web applications.</summary>
+ <language>en-US</language>
+ <copyright>Andreas Håkansson, Steven Robbins and contributors</copyright>
+ <iconUrl>http://nancyfx.org/nancy-nuget.png</iconUrl>
+ <licenseUrl>https://github.com/NancyFx/Nancy/blob/master/license.txt</licenseUrl>
+ <projectUrl>http://nancyfx.org</projectUrl>
+ <dependencies>
+ <dependency id="Nancy" />
+ <dependency id="ServiceStack.Text" version="2.26" />
+ </dependencies>
+ <tags>Nancy Json ServiceStack</tags>
+ </metadata>
+ <files>
+ <file src="build\binaries\Nancy.Serializers.Json.ServiceStack.dll" target="lib\net40" />
+ <file src="build\binaries\Nancy.Serializers.Json.ServiceStack.pdb" target="lib\net40" />
+ <file src="src\Nancy.Serializers.Json.ServiceStack\**\*.cs" target="src" />
+ </files>
+</package>
4 src/Nancy.Serializers.Json.ServiceStack/Nancy.Serializers.Json.ServiceStack/packages.config
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<packages>
+ <package id="ServiceStack.Text" version="2.26" />
+</packages>
BIN ...erializers.Json.ServiceStack/packages/ServiceStack.Text.2.26/ServiceStack.Text.2.26.nupkg
Binary file not shown.
340 ...alizers.Json.ServiceStack/packages/ServiceStack.Text.2.26/lib/net35/ServiceStack.Text.XML
@@ -0,0 +1,340 @@
+<?xml version="1.0"?>
+<doc>
+ <assembly>
+ <name>ServiceStack.Text</name>
+ </assembly>
+ <members>
+ <member name="M:ServiceStack.Text.ITypeSerializer`1.CanCreateFromString(System.Type)">
+ <summary>
+ Determines whether this serializer can create the specified type from a string.
+ </summary>
+ <param name="type">The type.</param>
+ <returns>
+ <c>true</c> if this instance [can create from string] the specified type; otherwise, <c>false</c>.
+ </returns>
+ </member>
+ <member name="M:ServiceStack.Text.ITypeSerializer`1.DeserializeFromString(System.String)">
+ <summary>
+ Parses the specified value.
+ </summary>
+ <param name="value">The value.</param>
+ <returns></returns>
+ </member>
+ <member name="M:ServiceStack.Text.ITypeSerializer`1.DeserializeFromReader(System.IO.TextReader)">
+ <summary>
+ Deserializes from reader.
+ </summary>
+ <param name="reader">The reader.</param>
+ <returns></returns>
+ </member>
+ <member name="M:ServiceStack.Text.ITypeSerializer`1.SerializeToString(`0)">
+ <summary>
+ Serializes to string.
+ </summary>
+ <param name="value">The value.</param>
+ <returns></returns>
+ </member>
+ <member name="M:ServiceStack.Text.ITypeSerializer`1.SerializeToWriter(`0,System.IO.TextWriter)">
+ <summary>
+ Serializes to writer.
+ </summary>
+ <param name="value">The value.</param>
+ <param name="writer">The writer.</param>
+ </member>
+ <member name="M:ServiceStack.Text.JsonSerializer`1.DeserializeFromString(System.String)">
+ <summary>
+ Parses the specified value.
+ </summary>
+ <param name="value">The value.</param>
+ <returns></returns>
+ </member>
+ <member name="T:ServiceStack.Text.Support.DoubleConverter">
+ <summary>
+ A class to allow the conversion of doubles to string representations of
+ their exact decimal values. The implementation aims for readability over
+ efficiency.
+
+ Courtesy of @JonSkeet
+ http://www.yoda.arachsys.com/csharp/DoubleConverter.cs
+ </summary>
+ </member>
+ <!-- Badly formed XML comment ignored for member "M:ServiceStack.Text.Support.DoubleConverter.ToExactString(System.Double)" -->
+ <!-- Badly formed XML comment ignored for member "T:ServiceStack.Text.Support.DoubleConverter.ArbitraryDecimal" -->
+ <!-- Badly formed XML comment ignored for member "F:ServiceStack.Text.Support.DoubleConverter.ArbitraryDecimal.digits" -->
+ <member name="F:ServiceStack.Text.Support.DoubleConverter.ArbitraryDecimal.decimalPoint">
+ <summary>
+ How many digits are *after* the decimal point
+ </summary>
+ </member>
+ <member name="M:ServiceStack.Text.Support.DoubleConverter.ArbitraryDecimal.#ctor(System.Int64)">
+ <summary>
+ Constructs an arbitrary decimal expansion from the given long.
+ The long must not be negative.
+ </summary>
+ </member>
+ <member name="M:ServiceStack.Text.Support.DoubleConverter.ArbitraryDecimal.MultiplyBy(System.Int32)">
+ <summary>
+ Multiplies the current expansion by the given amount, which should
+ only be 2 or 5.
+ </summary>
+ </member>
+ <member name="M:ServiceStack.Text.Support.DoubleConverter.ArbitraryDecimal.Shift(System.Int32)">
+ <summary>
+ Shifts the decimal point; a negative value makes
+ the decimal expansion bigger (as fewer digits come after the
+ decimal place) and a positive value makes the decimal
+ expansion smaller.
+ </summary>
+ </member>
+ <member name="M:ServiceStack.Text.Support.DoubleConverter.ArbitraryDecimal.Normalize">
+ <summary>
+ Removes leading/trailing zeroes from the expansion.
+ </summary>
+ </member>
+ <member name="M:ServiceStack.Text.Support.DoubleConverter.ArbitraryDecimal.ToString">
+ <summary>
+ Converts the value to a proper decimal string representation.
+ </summary>
+ </member>
+ <member name="T:ServiceStack.Text.Json.JsonWriter`1">
+ <summary>
+ Implement the serializer using a more static approach
+ </summary>
+ <typeparam name="T"></typeparam>
+ </member>
+ <member name="T:ServiceStack.Text.DateTimeExtensions">
+ <summary>
+ A fast, standards-based, serialization-issue free DateTime serailizer.
+ </summary>
+ </member>
+ <member name="M:ServiceStack.Text.Common.DeserializeTypeUtils.GetTypeStringConstructor(System.Type)">
+ <summary>
+ Get the type(string) constructor if exists
+ </summary>
+ <param name="type">The type.</param>
+ <returns></returns>
+ </member>
+ <member name="M:ServiceStack.Text.Common.JsWriter.HasAnyEscapeChars(System.String)">
+ <summary>
+ micro optimizations: using flags instead of value.IndexOfAny(EscapeChars)
+ </summary>
+ <param name="value"></param>
+ <returns></returns>
+ </member>
+ <member name="T:ServiceStack.Text.JsonSerializer">
+ <summary>
+ Creates an instance of a Type from a string value
+ </summary>
+ </member>
+ <member name="T:ServiceStack.Text.QueryStringWriter`1">
+ <summary>
+ Implement the serializer using a more static approach
+ </summary>
+ <typeparam name="T"></typeparam>
+ </member>
+ <member name="T:ServiceStack.Text.TypeSerializer">
+ <summary>
+ Creates an instance of a Type from a string value
+ </summary>
+ </member>
+ <member name="M:ServiceStack.Text.TypeSerializer.CanCreateFromString(System.Type)">
+ <summary>
+ Determines whether the specified type is convertible from string.
+ </summary>
+ <param name="type">The type.</param>
+ <returns>
+ <c>true</c> if the specified type is convertible from string; otherwise, <c>false</c>.
+ </returns>
+ </member>
+ <member name="M:ServiceStack.Text.TypeSerializer.DeserializeFromString``1(System.String)">
+ <summary>
+ Parses the specified value.
+ </summary>
+ <param name="value">The value.</param>
+ <returns></returns>
+ </member>
+ <member name="M:ServiceStack.Text.TypeSerializer.DeserializeFromString(System.String,System.Type)">
+ <summary>
+ Parses the specified type.
+ </summary>
+ <param name="type">The type.</param>
+ <param name="value">The value.</param>
+ <returns></returns>
+ </member>
+ <member name="M:ServiceStack.Text.TypeSerializer.ToStringDictionary``1(``0)">
+ <summary>
+ Useful extension method to get the Dictionary[string,string] representation of any POCO type.
+ </summary>
+ <returns></returns>
+ </member>
+ <member name="M:ServiceStack.Text.TypeSerializer.Dump``1(``0)">
+ <summary>
+ Recursively prints the contents of any POCO object in a human-friendly, readable format
+ </summary>
+ <returns></returns>
+ </member>
+ <member name="T:ServiceStack.Text.Controller.PathInfo">
+ <summary>
+ Class to hold
+ </summary>
+ </member>
+ <!-- Badly formed XML comment ignored for member "M:ServiceStack.Text.Controller.PathInfo.Parse(System.String)" -->
+ <member name="M:ServiceStack.Text.Json.JsonTypeSerializer.WriteRawString(System.IO.TextWriter,System.String)">
+ <summary>
+ Shortcut escape when we're sure value doesn't contain any escaped chars
+ </summary>
+ <param name="writer"></param>
+ <param name="value"></param>
+ </member>
+ <member name="M:ServiceStack.Text.Json.JsonTypeSerializer.EncodeMapKey(System.Object)">
+ <summary>
+ A JSON key needs to be a string with quotes
+ </summary>
+ <param name="value"></param>
+ <returns></returns>
+ </member>
+ <member name="M:ServiceStack.Text.Json.JsonTypeSerializer.ConvertFromUtf32(System.Int32)">
+ <summary>
+ Since Silverlight doesn't have char.ConvertFromUtf32() so putting Mono's implemenation inline.
+ </summary>
+ <param name="utf32"></param>
+ <returns></returns>
+ </member>
+ <member name="F:ServiceStack.Text.StreamExtensions.DefaultBufferSize">
+ <summary>
+ @jonskeet: Collection of utility methods which operate on streams.
+ r285, February 26th 2009: http://www.yoda.arachsys.com/csharp/miscutil/
+ </summary>
+ </member>
+ <member name="M:ServiceStack.Text.StreamExtensions.ReadFully(System.IO.Stream)">
+ <summary>
+ Reads the given stream up to the end, returning the data as a byte
+ array.
+ </summary>
+ </member>
+ <member name="M:ServiceStack.Text.StreamExtensions.ReadFully(System.IO.Stream,System.Int32)">
+ <summary>
+ Reads the given stream up to the end, returning the data as a byte
+ array, using the given buffer size.
+ </summary>
+ </member>
+ <member name="M:ServiceStack.Text.StreamExtensions.ReadFully(System.IO.Stream,System.Byte[])">
+ <summary>
+ Reads the given stream up to the end, returning the data as a byte
+ array, using the given buffer for transferring data. Note that the
+ current contents of the buffer is ignored, so the buffer needn't
+ be cleared beforehand.
+ </summary>
+ </member>
+ <member name="M:ServiceStack.Text.StreamExtensions.CopyTo(System.IO.Stream,System.IO.Stream)">
+ <summary>
+ Copies all the data from one stream into another.
+ </summary>
+ </member>
+ <member name="M:ServiceStack.Text.StreamExtensions.CopyTo(System.IO.Stream,System.IO.Stream,System.Int32)">
+ <summary>
+ Copies all the data from one stream into another, using a buffer
+ of the given size.
+ </summary>
+ </member>
+ <member name="M:ServiceStack.Text.StreamExtensions.CopyTo(System.IO.Stream,System.IO.Stream,System.Byte[])">
+ <summary>
+ Copies all the data from one stream into another, using the given
+ buffer for transferring data. Note that the current contents of
+ the buffer is ignored, so the buffer needn't be cleared beforehand.
+ </summary>
+ </member>
+ <member name="M:ServiceStack.Text.StreamExtensions.ReadExactly(System.IO.Stream,System.Int32)">
+ <summary>
+ Reads exactly the given number of bytes from the specified stream.
+ If the end of the stream is reached before the specified amount
+ of data is read, an exception is thrown.
+ </summary>
+ </member>
+ <member name="M:ServiceStack.Text.StreamExtensions.ReadExactly(System.IO.Stream,System.Byte[])">
+ <summary>
+ Reads into a buffer, filling it completely.
+ </summary>
+ </member>
+ <member name="M:ServiceStack.Text.StreamExtensions.ReadExactly(System.IO.Stream,System.Byte[],System.Int32)">
+ <summary>
+ Reads exactly the given number of bytes from the specified stream,
+ into the given buffer, starting at position 0 of the array.
+ </summary>
+ </member>
+ <member name="M:ServiceStack.Text.StreamExtensions.ReadExactly(System.IO.Stream,System.Byte[],System.Int32,System.Int32)">
+ <summary>
+ Reads exactly the given number of bytes from the specified stream,
+ into the given buffer, starting at position 0 of the array.
+ </summary>
+ </member>
+ <member name="M:ServiceStack.Text.StreamExtensions.ReadExactlyFast(System.IO.Stream,System.Byte[],System.Int32,System.Int32)">
+ <summary>
+ Same as ReadExactly, but without the argument checks.
+ </summary>
+ </member>
+ <member name="T:ServiceStack.Text.AssemblyUtils">
+ <summary>
+ Utils to load types
+ </summary>
+ </member>
+ <member name="M:ServiceStack.Text.AssemblyUtils.FindType(System.String)">
+ <summary>
+ Find the type from the name supplied
+ </summary>
+ <param name="typeName">[typeName] or [typeName, assemblyName]</param>
+ <returns></returns>
+ </member>
+ <member name="M:ServiceStack.Text.AssemblyUtils.FindType(System.String,System.String)">
+ <summary>
+ Find type if it exists
+ </summary>
+ <param name="typeName"></param>
+ <param name="assemblyName"></param>
+ <returns>The type if it exists</returns>
+ </member>
+ <member name="M:ServiceStack.Text.StringExtensions.BaseConvert(System.String,System.Int32,System.Int32)">
+ <summary>
+ Converts from base: 0 - 62
+ </summary>
+ <param name="source">The source.</param>
+ <param name="from">From.</param>
+ <param name="to">To.</param>
+ <returns></returns>
+ </member>
+ <member name="M:ServiceStack.Text.StringExtensions.FastToUtf8Bytes(System.String)">
+ <summary>
+ Skip the encoding process for 'safe strings'
+ </summary>
+ <param name="strVal"></param>
+ <returns></returns>
+ </member>
+ <member name="T:ServiceStack.Text.Jsv.JsvWriter`1">
+ <summary>
+ Implement the serializer using a more static approach
+ </summary>
+ <typeparam name="T"></typeparam>
+ </member>
+ <member name="M:ServiceStack.Text.Json.JsonUtils.HasAnyEscapeChars(System.String)">
+ <summary>
+ micro optimizations: using flags instead of value.IndexOfAny(EscapeChars)
+ </summary>
+ <param name="value"></param>
+ <returns></returns>
+ </member>
+ <member name="M:ServiceStack.Text.TypeSerializer`1.DeserializeFromString(System.String)">
+ <summary>
+ Parses the specified value.
+ </summary>
+ <param name="value">The value.</param>
+ <returns></returns>
+ </member>
+ <member name="M:ServiceStack.Text.Common.DateTimeSerializer.ParseWcfJsonDate(System.String)">
+ <summary>
+ WCF Json format: /Date(unixts+0000)/
+ </summary>
+ <param name="wcfJsonDate"></param>
+ <returns></returns>
+ </member>
+ </members>
+</doc>
BIN ...alizers.Json.ServiceStack/packages/ServiceStack.Text.2.26/lib/net35/ServiceStack.Text.dll
Binary file not shown.
BIN ...alizers.Json.ServiceStack/packages/ServiceStack.Text.2.26/lib/net35/ServiceStack.Text.pdb
Binary file not shown.
15 ...ncy.Serializers.Json.ServiceStack/packages/ServiceStack.Text.2.26/servicestack.text.nuget
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="utf-8"?>
+<package>
+ <metadata>
+ <id>ServiceStack.Text</id>
+ <version>2.26</version>
+ <authors>Demis Bellot</authors>
+ <owners>Demis Bellot</owners>
+ <description>.NET's fastest JSON, JSV and CSV Text Serializers (3x faster than JSON.NET)</description>
+ <projectUrl>https://github.com/ServiceStack/ServiceStack.Text</projectUrl>
+ <licenseUrl>https://github.com/ServiceStack/ServiceStack.Text/blob/master/LICENSE</licenseUrl>
+ <iconUrl>http://www.servicestack.net/logo-32x32.png</iconUrl>
+ <tags>JSON Text Serializer CSV JSV Dump PrettyPrint</tags>
+ <language>en-US</language>
+ </metadata>
+</package>
4 src/Nancy.Serializers.Json.ServiceStack/packages/repositories.config
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<repositories>
+ <repository path="..\Nancy.Serializers.Json.ServiceStack\packages.config" />
+</repositories>
BIN tools/nuget/NuGet.exe
Binary file not shown.

0 comments on commit d509269

Please sign in to comment.
Something went wrong with that request. Please try again.