Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Skip writing invalid \u chars, added latest NuGet package

  • Loading branch information...
commit b8aa1574d6da92e2f6ab3f9c2e6c42681aeaae8b 1 parent e4ac88c
@mythz mythz authored
View
BIN  NuGet/lib/net35/ServiceStack.Text.dll
Binary file not shown
View
2  NuGet/servicestack.text.nuget
@@ -2,7 +2,7 @@
<package>
<metadata>
<id>ServiceStack.Text</id>
- <version>2.09</version>
+ <version>2.20</version>
<authors>Demis Bellot</authors>
<owners>Demis Bellot</owners>
<description>.NET's fastest JSON, JSV and CSV Text Serializers</description>
View
BIN  build/ServiceStack.Text.2.20.nupkg
Binary file not shown
View
BIN  build/ServiceStack.Text.2.9.nupkg
Binary file not shown
View
2  src/ServiceStack.Text/Env.cs
@@ -23,7 +23,7 @@ static Env()
+ (IsMonoTouch ? " MonoTouch" : "");
}
- public static decimal ServiceStackVersion = 2.20m;
+ public static decimal ServiceStackVersion = 2.22m;
public static bool IsUnix { get; set; }
View
12 src/ServiceStack.Text/Json/JsonUtils.cs
@@ -84,10 +84,14 @@ public static void WriteString(TextWriter writer, string value)
continue;
}
- // Default, turn into a \uXXXX sequence
- IntToHex(value[i], hexSeqBuffer);
- writer.Write("\\u");
- writer.Write(hexSeqBuffer);
+ var isValidSequence = value[i] < 0xD800 || value[i] > 0xDFFF;
+ if (isValidSequence)
+ {
+ // Default, turn into a \uXXXX sequence
+ IntToHex(value[i], hexSeqBuffer);
+ writer.Write("\\u");
+ writer.Write(hexSeqBuffer);
+ }
}
writer.Write(QuoteChar);
View
2  src/ServiceStack.Text/Properties/AssemblyInfo.cs
@@ -32,5 +32,5 @@
// 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("2.2.0.*")]
+[assembly: AssemblyVersion("2.2.2.*")]
//[assembly: AssemblyFileVersion("1.0.0.0")]
Please sign in to comment.
Something went wrong with that request. Please try again.